@@ -274,7 +274,7 @@ defmodule Module.Types.Expr do
274274 if Keyword . get ( meta , :no_parens , false ) do
275275 Of . map_fetch ( expr , type , key_or_fun , stack , context )
276276 else
277- { mods , context } = Of . remote ( type , key_or_fun , 0 , [ :dot ] , expr , meta , stack , context )
277+ { mods , context } = Of . modules ( type , key_or_fun , 0 , [ :dot ] , expr , meta , stack , context )
278278 apply_many ( mods , key_or_fun , [ ] , expr , stack , context )
279279 end
280280 end
@@ -283,7 +283,7 @@ defmodule Module.Types.Expr do
283283 def of_expr ( { { :. , _ , [ remote , name ] } , meta , args } = expr , stack , context ) do
284284 { remote_type , context } = of_expr ( remote , stack , context )
285285 { args_types , context } = Enum . map_reduce ( args , context , & of_expr ( & 1 , stack , & 2 ) )
286- { mods , context } = Of . remote ( remote_type , name , length ( args ) , expr , meta , stack , context )
286+ { mods , context } = Of . modules ( remote_type , name , length ( args ) , expr , meta , stack , context )
287287 apply_many ( mods , name , args_types , expr , stack , context )
288288 end
289289
@@ -297,7 +297,8 @@ defmodule Module.Types.Expr do
297297 { remote_type , context } = of_expr ( remote , stack , context )
298298 # TODO: We cannot return the unions of functions. Do we forbid this?
299299 # Do we check it is always the same return type? Do we simply say it is a function?
300- { _mods , context } = Of . remote ( remote_type , name , arity , expr , meta , stack , context )
300+ { mods , context } = Of . modules ( remote_type , name , arity , expr , meta , stack , context )
301+ context = Enum . reduce ( mods , context , & Of . remote ( & 1 , name , arity , meta , stack , & 2 ) )
301302 { fun ( ) , context }
302303 end
303304
0 commit comments