@@ -674,9 +674,9 @@ defmodule Module.Types.Pattern do
674674 { prefix , suffix } = unpack_list ( list , [ ] )
675675
676676 { prefix , context } =
677- Enum . map_reduce ( prefix , context , & of_guard ( & 1 , dynamic ( ) , expr , stack , & 2 ) )
677+ Enum . map_reduce ( prefix , context , & of_guard ( & 1 , term ( ) , expr , stack , & 2 ) )
678678
679- { suffix , context } = of_guard ( suffix , dynamic ( ) , expr , stack , context )
679+ { suffix , context } = of_guard ( suffix , term ( ) , expr , stack , context )
680680 { non_empty_list ( Enum . reduce ( prefix , & union / 2 ) , suffix ) , context }
681681 end
682682
@@ -712,22 +712,22 @@ defmodule Module.Types.Pattern do
712712
713713 # {...}
714714 def of_guard ( { :{} , _meta , args } , _expected , expr , stack , context ) do
715- { types , context } = Enum . map_reduce ( args , context , & of_guard ( & 1 , dynamic ( ) , expr , stack , & 2 ) )
715+ { types , context } = Enum . map_reduce ( args , context , & of_guard ( & 1 , term ( ) , expr , stack , & 2 ) )
716716 { tuple ( types ) , context }
717717 end
718718
719719 # var.field
720720 def of_guard ( { { :. , _ , [ callee , key ] } , _ , [ ] } = map_fetch , _expected , expr , stack , context )
721721 when not is_atom ( callee ) do
722- { type , context } = of_guard ( callee , dynamic ( ) , expr , stack , context )
722+ { type , context } = of_guard ( callee , term ( ) , expr , stack , context )
723723 Of . map_fetch ( map_fetch , type , key , stack , context )
724724 end
725725
726726 # Comparison operators
727727 def of_guard ( { { :. , _ , [ :erlang , function ] } , _ , args } , _expected , expr , stack , context )
728728 when function in [ :== , :"/=" , :"=:=" , :"=/=" ] do
729729 { _args_type , context } =
730- Enum . map_reduce ( args , context , & of_guard ( & 1 , dynamic ( ) , expr , stack , & 2 ) )
730+ Enum . map_reduce ( args , context , & of_guard ( & 1 , term ( ) , expr , stack , & 2 ) )
731731
732732 { boolean ( ) , context }
733733 end
0 commit comments