<div dir="ltr">That fixed the case when the map doesn't match but I get the same error when it's the map that matches and other patterns that don't:<div><br></div><div><div>-module(bug).</div><div>f() -></div>
<div> case #{} of</div><div> #{} -> 0;</div><div> a -> 1 </div><div> end.</div></div><div><br></div><div>This is on master from today (aab1afa8a63081f2c30f83ebe8b6caaac979795c).</div><div><br></div><div>/ Ulf</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 4, 2014 at 11:38 PM, Anthony Ramine <span dir="ltr"><<a href="mailto:n.oxyde@gmail.com" target="_blank">n.oxyde@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><a href="https://github.com/erlang/otp/pull/267" target="_blank">https://github.com/erlang/otp/pull/267</a><br>
<br>
--<br>
Anthony Ramine<br>
<br>
Le 4 mars 2014 à 09:45, Ulf Norell <<a href="mailto:ulf.norell@quviq.com">ulf.norell@quviq.com</a>> a écrit :<br>
<div><div class="h5"><br>
> This one crashes in a different place but likely for the same reason.<br>
><br>
> -module(bug).<br>
> f() -><br>
> case true of<br>
> #{} -> error;<br>
> true -> ok<br>
> end.<br>
><br>
> $ erl<br>
> Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]<br>
><br>
> Eshell V6.0 (abort with ^G)<br>
> 1> c(bug).<br>
> Function: f/0<br>
> bug.erl: internal error in core_fold_module;<br>
> crash reason: function_clause<br>
><br>
> in function sys_core_fold:opt_bool_clauses/3<br>
> called as sys_core_fold:opt_bool_clauses([],true,false)<br>
> in call from sys_core_fold:opt_bool_clauses/3 (sys_core_fold.erl, line 1815)<br>
> in call from sys_core_fold:opt_bool_clauses/1 (sys_core_fold.erl, line 1790)<br>
> in call from sys_core_fold:opt_bool_case/1 (sys_core_fold.erl, line 1779)<br>
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 347)<br>
> in call from sys_core_fold:opt_simple_let_1/4 (sys_core_fold.erl, line 2562)<br>
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 355)<br>
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 279)<br>
> bug.erl:2: Warning: function f/0 is unused<br>
> error<br>
><br>
> / Ulf<br>
><br>
><br>
><br>
> On Tue, Mar 4, 2014 at 9:42 AM, Ulf Norell <<a href="mailto:ulf.norell@quviq.com">ulf.norell@quviq.com</a>> wrote:<br>
> -module(bug).<br>
> f() -><br>
> case maybe_map of<br>
> #{} -> ok;<br>
> not_map -> error<br>
> end.<br>
><br>
> $ erl<br>
> Erlang/OTP 17 [RELEASE CANDIDATE 2] [erts-6.0] [source-a74e66a] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false]<br>
><br>
> Eshell V6.0 (abort with ^G)<br>
> 1> c(bug).<br>
> Function: f/0<br>
> bug.erl: internal error in core_fold_module;<br>
> crash reason: {case_clause,{none}}<br>
><br>
> in function sys_core_fold:will_match/2 (sys_core_fold.erl, line 1748)<br>
> in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1701)<br>
> in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1718)<br>
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 352)<br>
> in call from sys_core_fold:clause/4 (sys_core_fold.erl, line 1481)<br>
> in call from sys_core_fold:clauses/5 (sys_core_fold.erl, line 1699)<br>
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 352)<br>
> in call from sys_core_fold:expr/3 (sys_core_fold.erl, line 279)<br>
> bug.erl:2: Warning: function f/0 is unused<br>
> error<br>
><br>
> / Ulf<br>
><br>
><br>
</div></div>> _______________________________________________<br>
> erlang-bugs mailing list<br>
> <a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
> <a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
<br>
_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
</blockquote></div><br></div>