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

[erlc] newly introduced crash on pattern matching of maps #6445

Closed
RobinMorisset opened this issue Nov 7, 2022 · 0 comments
Closed

[erlc] newly introduced crash on pattern matching of maps #6445

RobinMorisset opened this issue Nov 7, 2022 · 0 comments
Assignees
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM

Comments

@RobinMorisset
Copy link
Contributor

Cherry-picking 2983a25 on top of master introduces a bug (not present on master otherwise): the following code:

-module(pat_alias).
-compile([export_all]).

f(#{} = #{}) ->
    ok.

causes an erlc crash with the following error message:

Function: f/1
minimized/pat_alias.erl: internal error in pass core:
exception error: no match of right hand side value []
  in function  v3_core:pat_alias/2 (v3_core.erl, line 2203)
  in call from v3_core:pattern/2 (v3_core.erl, line 2068)
  in call from v3_core:pattern_list/2 (v3_core.erl, line 2246)
  in call from v3_core:clause/2 (v3_core.erl, line 302)
  in call from v3_core:clauses/2 (v3_core.erl, line 296)
  in call from v3_core:body/4 (v3_core.erl, line 286)
  in call from v3_core:function/3 (v3_core.erl, line 266)
  in call from v3_core:form/3 (v3_core.erl, line 214)
@RobinMorisset RobinMorisset added the bug Issue is reported as a bug label Nov 7, 2022
@bjorng bjorng self-assigned this Nov 8, 2022
@bjorng bjorng added the team:VM Assigned to OTP team VM label Nov 8, 2022
@bjorng bjorng closed this as completed Nov 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug team:VM Assigned to OTP team VM
Projects
None yet
Development

No branches or pull requests

2 participants