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 in typechecker:do_type_check_expr_in/3: bad_key in map_get/2 #545

Closed
RobinMorisset opened this issue Jun 7, 2023 · 1 comment
Closed
Labels

Comments

@RobinMorisset
Copy link

Running gradualizer on the following Erlang code:

f() ->
    (abs(_V0 = erlang:abs(erlang:abs(1.0))) =:= ok) orelse is_map_key(_V0, ok).

results in the following crash:

escript: exception error: bad key: '_V0'
  in function  map_get/2
     called as map_get('_V0',#{})
     *** argument 1: not present in map
  in call from typechecker:do_type_check_expr_in/3 (src/typechecker.erl, line 2526)
  in call from typechecker:type_check_expr_in/3 (src/typechecker.erl, line 2514)
  in call from typechecker:'-type_check_call_ty/4-lc$^0/1-0-'/2 (src/typechecker.erl, line 2302)
  in call from typechecker:type_check_call_ty/4 (src/typechecker.erl, line 2303)
  in call from typechecker:do_type_check_expr/2 (src/typechecker.erl, line 1843)
  in call from typechecker:type_check_expr/2 (src/typechecker.erl, line 1714)
  in call from typechecker:type_check_logic_op/4 (src/typechecker.erl, line 2204)
@erszcz erszcz added the bug label Jun 7, 2023
@erszcz
Copy link
Collaborator

erszcz commented Oct 15, 2024

Thanks for the report, @RobinMorisset. This is not the case as of 7433863.

@erszcz erszcz closed this as completed Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants