@@ -274,7 +274,7 @@ defmodule Module.Types.Expr do
274
274
if Keyword . get ( meta , :no_parens , false ) do
275
275
Of . map_fetch ( expr , type , key_or_fun , stack , context )
276
276
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 )
278
278
apply_many ( mods , key_or_fun , [ ] , expr , stack , context )
279
279
end
280
280
end
@@ -283,7 +283,7 @@ defmodule Module.Types.Expr do
283
283
def of_expr ( { { :. , _ , [ remote , name ] } , meta , args } = expr , stack , context ) do
284
284
{ remote_type , context } = of_expr ( remote , stack , context )
285
285
{ 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 )
287
287
apply_many ( mods , name , args_types , expr , stack , context )
288
288
end
289
289
@@ -297,7 +297,8 @@ defmodule Module.Types.Expr do
297
297
{ remote_type , context } = of_expr ( remote , stack , context )
298
298
# TODO: We cannot return the unions of functions. Do we forbid this?
299
299
# 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 ) )
301
302
{ fun ( ) , context }
302
303
end
303
304
0 commit comments