Skip to content

Commit

Permalink
Pass the self-check again
Browse files Browse the repository at this point in the history
  • Loading branch information
erszcz committed Mar 3, 2023
1 parent f066767 commit 7c082b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/typechecker.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3631,8 +3631,7 @@ instantiate({type, P, Ty, Args}, Map) ->
_ when is_list(Args) ->
instantiate_inner(?assert_type(Args, list()), Map)
end,
%% TODO: Another case of union arg to an intersection-typed fun :(
{{type, P, Ty, NewArgs}, Set, NewMap};
{type(Ty, P, NewArgs), Set, NewMap};
instantiate(T = {Tag, _,_}, Map)
when Tag == integer orelse Tag == atom orelse Tag == char ->
{T, maps:new(), Map};
Expand Down Expand Up @@ -5313,6 +5312,10 @@ type_of_bin_element({bin_element, _P, Expr, _Size, Specifiers}, OccursAs) ->
type(Name, Args) ->
{type, erl_anno:new(0), Name, Args}.

-spec type(_, _, _) -> type().
type(Name, Anno, Args) ->
{type, Anno, Name, Args}.

%% Helper to create a type, typically a normalized type
-spec type(atom()) -> type().
type(top) ->
Expand Down

0 comments on commit 7c082b7

Please sign in to comment.