<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
<div name="messageBodySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">On 3 Aug 2018, 18:32 +0200, Brujo Benavides <elbrujohalcon@gmail.com>, wrote:<br /></div>
<div name="messageReplySection" style="font-size: 14px; font-family: -apple-system, BlinkMacSystemFont, sans-serif;">
<blockquote type="cite" style="margin: 5px 5px; padding-left: 10px; border-left: thin solid #1abc9c;">Well, that’s not happening here…
<div class=""> </div>
</blockquote>
<div><br /></div>
<div>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><br /></div>
<div><br /></div>
<div>
<div>-module(a).<br />
<br />
-export([err/2]).<br />
<br />
err(_, <<Length, Data/binary>>) -></div>
<div>    case {Length, Data} of<br />
        {0, _} -> Data;<br />
        {4, <<Rest/binary>>} -> Rest<br />
    end.</div>
</div>
<div><br /></div>
<div>Calling a:err(1, <<0>>) returns <<0>>. That's on 21.0.2</div>
<div><br /></div>
<div>Michał.</div>
</div>
</body>
</html>