@@ -211,11 +211,11 @@ defmodule Module.Types.Apply do
211
211
{ :erlang , :rem , [ { [ integer ( ) , integer ( ) ] , integer ( ) } ] } ,
212
212
{ :erlang , :round , [ { [ union ( integer ( ) , float ( ) ) ] , integer ( ) } ] } ,
213
213
{ :erlang , :self , [ { [ ] , pid ( ) } ] } ,
214
- { :erlang , :spawn , [ { [ fun ( ) ] , pid ( ) } ] } ,
214
+ { :erlang , :spawn , [ { [ fun ( 0 ) ] , pid ( ) } ] } ,
215
215
{ :erlang , :spawn , [ { mfargs , pid ( ) } ] } ,
216
- { :erlang , :spawn_link , [ { [ fun ( ) ] , pid ( ) } ] } ,
216
+ { :erlang , :spawn_link , [ { [ fun ( 0 ) ] , pid ( ) } ] } ,
217
217
{ :erlang , :spawn_link , [ { mfargs , pid ( ) } ] } ,
218
- { :erlang , :spawn_monitor , [ { [ fun ( ) ] , tuple ( [ reference ( ) , pid ( ) ] ) } ] } ,
218
+ { :erlang , :spawn_monitor , [ { [ fun ( 0 ) ] , tuple ( [ reference ( ) , pid ( ) ] ) } ] } ,
219
219
{ :erlang , :spawn_monitor , [ { mfargs , tuple ( [ reference ( ) , pid ( ) ] ) } ] } ,
220
220
{ :erlang , :tuple_size , [ { [ open_tuple ( [ ] ) ] , integer ( ) } ] } ,
221
221
{ :erlang , :trunc , [ { [ union ( integer ( ) , float ( ) ) ] , integer ( ) } ] } ,
@@ -475,7 +475,7 @@ defmodule Module.Types.Apply do
475
475
# TODO: We cannot return the unions of functions. Do we forbid this?
476
476
# Do we check it is always the same return type? Do we simply say it is a function?
477
477
if stack . mode == :traversal do
478
- { dynamic ( fun ( ) ) , context }
478
+ { dynamic ( fun ( arity ) ) , context }
479
479
else
480
480
context =
481
481
Enum . reduce (
@@ -484,7 +484,7 @@ defmodule Module.Types.Apply do
484
484
& ( signature ( & 1 , fun , arity , meta , stack , & 2 ) |> elem ( 1 ) )
485
485
)
486
486
487
- { dynamic ( fun ( ) ) , context }
487
+ { dynamic ( fun ( arity ) ) , context }
488
488
end
489
489
end
490
490
@@ -669,17 +669,17 @@ defmodule Module.Types.Apply do
669
669
670
670
case stack . local_handler . ( meta , fun_arity , stack , context ) do
671
671
false ->
672
- { dynamic ( fun ( ) ) , context }
672
+ { dynamic ( fun ( arity ) ) , context }
673
673
674
674
{ _kind , _info , context } when stack . mode == :traversal ->
675
- { dynamic ( fun ( ) ) , context }
675
+ { dynamic ( fun ( arity ) ) , context }
676
676
677
677
{ kind , _info , context } ->
678
678
if stack . mode != :infer and kind == :defp do
679
679
# Mark all clauses as used, as the function is being exported.
680
- { dynamic ( fun ( ) ) , put_in ( context . local_used [ fun_arity ] , [ ] ) }
680
+ { dynamic ( fun ( arity ) ) , put_in ( context . local_used [ fun_arity ] , [ ] ) }
681
681
else
682
- { dynamic ( fun ( ) ) , context }
682
+ { dynamic ( fun ( arity ) ) , context }
683
683
end
684
684
end
685
685
end
0 commit comments