Hello everyone,<br><div class="gmail_quote"><div><div><br></div><div>The following module fails to compile using both R15B03-01 and R16A:</div><div><br></div><div><div><font face="courier new, monospace"> -module(sample).</font></div>
<div><font face="courier new, monospace"> -export([hello/1]).</font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> hello(X) -></font></div><div><font face="courier new, monospace"> case do_something(X) of</font></div>
<div><font face="courier new, monospace"> false -></font></div><div><font face="courier new, monospace"> A = false;</font></div><div><font face="courier new, monospace"> Res -></font></div><div>
<font face="courier new, monospace"> { A, B } = Res,</font></div><div><font face="courier new, monospace"> do_something(A),</font></div><div><font face="courier new, monospace"> do_something(B)</font></div>
<div><font face="courier new, monospace"> end,</font></div><div><font face="courier new, monospace"> ThisShouldNotFail = A,</font></div><div><font face="courier new, monospace"> ok.</font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace"> do_something(X) -></font></div><div><font face="courier new, monospace"> external:do_something(X).</font></div></div><div><br></div><div>With the following exception:</div>
<div><br></div><div><div><font face="courier new, monospace"> crash reason: {function_clause,</font></div><div><font face="courier new, monospace"> [{v3_kernel,lit_vars,</font></div><div><font face="courier new, monospace"> [{ivalues,</font></div>
<div><font face="courier new, monospace"> [11,{file,"sample.erl"}],</font></div><div><font face="courier new, monospace"> [{k_var,[],ker4},{k_atom,[],ok}]}],</font></div>
<div><font face="courier new, monospace"> [{file,"v3_kernel.erl"},{line,1749}]},</font></div><div><font face="courier new, monospace"> {v3_kernel,uexpr,3,[{file,"v3_kernel.erl"},{line,1628}]},</font></div>
<div><font face="courier new, monospace"> {v3_kernel,ubody,3,[{file,"v3_kernel.erl"},{line,1408}]},</font></div><div><font face="courier new, monospace"> {v3_kernel,ubody,3,[{file,"v3_kernel.erl"},{line,1409}]},</font></div>
<div><font face="courier new, monospace"> {v3_kernel,umatch,3,[{file,"v3_kernel.erl"},{line,1716}]},</font></div><div><font face="courier new, monospace"> {v3_kernel,'-umatch_list/3-anonymous-0-',3,</font></div>
<div><font face="courier new, monospace"> [{file,"v3_kernel.erl"},{line,1735}]},</font></div><div><font face="courier new, monospace"> {v3_kernel,umatch,3,[{file,"v3_kernel.erl"},{line,1711}]},</font></div>
<div><font face="courier new, monospace"> {v3_kernel,'-umatch_list/3-anonymous-0-',3,</font></div><div><font face="courier new, monospace"> [{file,"v3_kernel.erl"},{line,1735}]}]}</font></div>
</div><div><br></div><div>The code and exceptions are also available here: <a href="https://gist.github.com/7bd4eea30cd187e68caa">https://gist.github.com/7bd4eea30cd187e68caa</a></div><div><br></div><div>Removing the `ThisShouldNotFail` assignment makes it work correctly, although I wouldn't expect it to explode with that line and just output a couple warnings instead. </div>
<div><br></div><div>This snippet was extract from a more complex code. The name of the functions, module and variables do not seem to affect the failure.</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
I tried to further debug the issue but I could not pinpoint the failure. Let me know if I can help any further.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Thank you for your time,</div></div><div><br></div><div><br></div><span style="font-family:arial,sans-serif;font-size:13px;border-collapse:collapse"><b><span style="border-collapse:separate;font-family:arial;font-weight:normal"><div>
<span style="font-family:arial,sans-serif;border-collapse:collapse"><b>José Valim</b></span></div><div><span style="font-family:arial,sans-serif;border-collapse:collapse"><div><span style="font-family:verdana,sans-serif;font-size:x-small"><a href="http://www.plataformatec.com.br/" target="_blank" style="color:rgb(42,93,176)">www.plataformatec.com.br</a></span></div>
<div><span style="font-family:verdana,sans-serif;font-size:x-small">Founder and Lead Developer</span></div></span></div></span></b></span></div><div> </div></div><br>