Open
Description
Describe the bug
Internal error in compiler using <:-
and &&
.
To Reproduce
Compiling the following module
-module(bug).
-export([bug/0]).
bug() ->
[X || X <:- [] && #{key1 := X, key2 := _} <- [] ].
results in the error
Function: bug/0
bug.erl: internal error in pass core:
exception error: no function clause matching v3_core:cpat_map_pairs([{c_var,[],12}])
in function v3_core:cpat_map_pairs/1 (v3_core.erl:3725)
in call from v3_core:cpattern/1 (v3_core.erl:3715)
in call from v3_core:cpattern/1 (v3_core.erl:3711)
in call from v3_core:cpattern_list/1 (v3_core.erl:3705)
in call from v3_core:cpattern_list/1 (v3_core.erl:3705)
in call from v3_core:cclause/3 (v3_core.erl:3691)
in call from lists:mapfoldl_1/3 (lists.erl:2673)
{error,[error]}
Expected behavior
Successful compilation.
Affected versions
OTP-28.0.1