[erlang-bugs] Internal error in sys_core_fold when matching on map is guaranteed to fail
Ulf Norell
ulf.norell@REDACTED
Tue Mar 4 09:45:13 CET 2014
This one crashes in a different place but likely for the same reason.
-module(bug).
f() ->
case true of
#{} -> error;
true -> ok
end.
$ erl
Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit]
[smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.0 (abort with ^G)
1> c(bug).
Function: f/0
bug.erl: internal error in core_fold_module;
crash reason: function_clause
in function sys_core_fold:opt_bool_clauses/3
called as sys_core_fold:opt_bool_clauses([],true,false)
in call from sys_core_fold:opt_bool_clauses/3 (sys_core_fold.erl, line
1815)
in call from sys_core_fold:opt_bool_clauses/1 (sys_core_fold.erl, line
1790)
in call from sys_core_fold:opt_bool_case/1 (sys_core_fold.erl, line 1779)
in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 347)
in call from sys_core_fold:opt_simple_let_1/4 (sys_core_fold.erl, line
2562)
in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 355)
in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 279)
bug.erl:2: Warning: function f/0 is unused
error
/ Ulf
On Tue, Mar 4, 2014 at 9:42 AM, Ulf Norell <ulf.norell@REDACTED> wrote:
> -module(bug).
> f() ->
> case maybe_map of
> #{} -> ok;
> not_map -> error
> end.
>
> $ erl
> Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit]
> [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]
>
> Eshell V6.0 (abort with ^G)
> 1> c(bug).
> Function: f/0
> bug.erl: internal error in core_fold_module;
> crash reason: {case_clause,{none}}
>
> in function sys_core_fold:will_match/2 (sys_core_fold.erl, line 1748)
> in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1701)
> in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1718)
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 352)
> in call from sys_core_fold:clause/4 (sys_core_fold.erl, line 1481)
> in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1699)
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 352)
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 279)
> bug.erl:2: Warning: function f/0 is unused
> error
>
> / Ulf
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20140304/b826c1a8/attachment.htm>
More information about the erlang-bugs
mailing list