<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Yeah, you’re right Micha<span style="font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px;" class="">ł! :)</span><div class=""><br class=""></div><div class="">In OTP20 it works…</div><div class=""><br class=""></div><div class=""><div class="">Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]</div><div class=""><br class=""></div><div class="">Eshell V9.1  (abort with ^G)</div><div class="">1> c(a), a:err(<<0>>).</div><div class="">{0,<<>>}</div><div class="">2></div><div class=""><br class="webkit-block-placeholder"></div><div class=""><p style="margin: 0px 0px 2px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: "Helvetica Neue"; color: rgba(0, 0, 0, 0.85098);" class=""><b class="">格通: </b>I think you should <a href="http://bugs.erlang.org/" class="">report the bug</a> :)</p></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class=""><span id="docs-internal-guid-e691a4cc-056a-0210-b8b7-ea8d87d888ad" class=""><span style="font-size: 11pt; font-family: Arial; font-weight: 700; font-variant-ligatures: normal; font-variant-position: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class=""><br class="Apple-interchange-newline"><hr class=""></span></span><div class=""><b class=""><i class=""><a href="http://about.me/elbrujohalcon" class="">Brujo Benavides</a></i></b></div></div></div><div style="color: rgb(0, 0, 0); font-family: 'Trebuchet MS'; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><b class=""><br class=""></b></div><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On 3 Aug 2018, at 13:45, Michał Muskała <<a href="mailto:michal@muskala.eu" class="">michal@muskala.eu</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

<title class=""></title>

<div class="">
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">On 3 Aug 2018, 18:32 +0200, Brujo Benavides <<a href="mailto:elbrujohalcon@gmail.com" class="">elbrujohalcon@gmail.com</a>>, wrote:<br class=""></div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;" class="">
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;" class="">Well, that’s not happening here…
<div class=""> </div>
</blockquote>
<div class=""><br class=""></div>
<div class="">I think you simplified the function too much, so it doesn't trigger the bug in the compiler anymore. I can reproduce the bug with a somewhat simpler code:</div>
<div class=""><br class=""></div>
<div class=""><br class=""></div>
<div class="">
<div class="">-module(a).<br class="">
<br class="">
-export([err/2]).<br class="">
<br class="">
err(_, <<Length, Data/binary>>) -></div>
<div class="">    case {Length, Data} of<br class="">
        {0, _} -> Data;<br class="">
        {4, <<Rest/binary>>} -> Rest<br class="">
    end.</div>
</div>
<div class=""><br class=""></div>
<div class="">Calling a:err(1, <<0>>) returns <<0>>. That's on 21.0.2</div>
<div class=""><br class=""></div>
<div class="">Michał.</div>
</div>
</div>

</div></blockquote></div><br class=""></div></body></html>