[erlang-bugs] Unused variable causing v3_kernel crash

José Valim <>
Sat Feb 2 21:42:19 CET 2013

Hello everyone,

The following module fails to compile using both R15B03-01 and R16A:


    hello(X) ->
      case do_something(X) of
        false ->
          A = false;
        Res ->
          { A, B } = Res,
      ThisShouldNotFail = A,

    do_something(X) ->

With the following exception:

    crash reason: {function_clause,






The code and exceptions are also available here:

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.

This snippet was extract from a more complex code. The name of the
functions, module and variables do not seem to affect the failure.

I tried to further debug the issue but I could not pinpoint the
failure. Let me know if I can help any further.

Thank you for your time,

José Valim
Founder and Lead Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20130202/6345728e/attachment.html>

More information about the erlang-bugs mailing list