Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on float pattern with any() spec #68

Closed
UlfNorell opened this issue Nov 5, 2018 · 0 comments
Closed

Crash on float pattern with any() spec #68

UlfNorell opened this issue Nov 5, 2018 · 0 comments

Comments

@UlfNorell
Copy link
Collaborator

Test case:

%% -spec h(_) -> apple | banana.  % Same error with or without spec
h(1.0) -> banana;
h(_) -> apple.

Error

** exception error: no function clause matching typechecker:add_any_types_pat({float,14,1.0},#{}) (src/typechecker.erl, line 2542)
     in function  typechecker:add_type_pat/4 (src/typechecker.erl, line 2358)
     in call from typechecker:add_types_pats/4 (src/typechecker.erl, line 2348)
     in call from typechecker:check_clause/4 (src/typechecker.erl, line 2300)
     in call from lists:map/2 (lists.erl, line 1239)
     in call from typechecker:check_clauses/4 (src/typechecker.erl, line 2286)
     in call from typechecker:check_clauses_fun/3 (src/typechecker.erl, line 2256)
     in call from typechecker:'-type_check_forms/2-fun-0-'/5 (src/typechecker.erl, line 2680)
UlfNorell added a commit to UlfNorell/Gradualizer that referenced this issue Nov 5, 2018
@josefs josefs closed this as completed in #69 Nov 5, 2018
berbiche pushed a commit to berbiche/Gradualizer that referenced this issue Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant