@@ -211,11 +211,11 @@ defmodule Module.Types.Apply do
211211 { :erlang , :rem , [ { [ integer ( ) , integer ( ) ] , integer ( ) } ] } ,
212212 { :erlang , :round , [ { [ union ( integer ( ) , float ( ) ) ] , integer ( ) } ] } ,
213213 { :erlang , :self , [ { [ ] , pid ( ) } ] } ,
214- { :erlang , :spawn , [ { [ fun ( ) ] , pid ( ) } ] } ,
214+ { :erlang , :spawn , [ { [ fun ( 0 ) ] , pid ( ) } ] } ,
215215 { :erlang , :spawn , [ { mfargs , pid ( ) } ] } ,
216- { :erlang , :spawn_link , [ { [ fun ( ) ] , pid ( ) } ] } ,
216+ { :erlang , :spawn_link , [ { [ fun ( 0 ) ] , pid ( ) } ] } ,
217217 { :erlang , :spawn_link , [ { mfargs , pid ( ) } ] } ,
218- { :erlang , :spawn_monitor , [ { [ fun ( ) ] , tuple ( [ reference ( ) , pid ( ) ] ) } ] } ,
218+ { :erlang , :spawn_monitor , [ { [ fun ( 0 ) ] , tuple ( [ reference ( ) , pid ( ) ] ) } ] } ,
219219 { :erlang , :spawn_monitor , [ { mfargs , tuple ( [ reference ( ) , pid ( ) ] ) } ] } ,
220220 { :erlang , :tuple_size , [ { [ open_tuple ( [ ] ) ] , integer ( ) } ] } ,
221221 { :erlang , :trunc , [ { [ union ( integer ( ) , float ( ) ) ] , integer ( ) } ] } ,
@@ -475,7 +475,7 @@ defmodule Module.Types.Apply do
475475 # TODO: We cannot return the unions of functions. Do we forbid this?
476476 # Do we check it is always the same return type? Do we simply say it is a function?
477477 if stack . mode == :traversal do
478- { dynamic ( fun ( ) ) , context }
478+ { dynamic ( fun ( arity ) ) , context }
479479 else
480480 context =
481481 Enum . reduce (
@@ -484,7 +484,7 @@ defmodule Module.Types.Apply do
484484 & ( signature ( & 1 , fun , arity , meta , stack , & 2 ) |> elem ( 1 ) )
485485 )
486486
487- { dynamic ( fun ( ) ) , context }
487+ { dynamic ( fun ( arity ) ) , context }
488488 end
489489 end
490490
@@ -669,17 +669,17 @@ defmodule Module.Types.Apply do
669669
670670 case stack . local_handler . ( meta , fun_arity , stack , context ) do
671671 false ->
672- { dynamic ( fun ( ) ) , context }
672+ { dynamic ( fun ( arity ) ) , context }
673673
674674 { _kind , _info , context } when stack . mode == :traversal ->
675- { dynamic ( fun ( ) ) , context }
675+ { dynamic ( fun ( arity ) ) , context }
676676
677677 { kind , _info , context } ->
678678 if stack . mode != :infer and kind == :defp do
679679 # 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 ] , [ ] ) }
681681 else
682- { dynamic ( fun ( ) ) , context }
682+ { dynamic ( fun ( arity ) ) , context }
683683 end
684684 end
685685 end
0 commit comments