Skip to content

Instantly share code, notes, and snippets.

@josevalim
Last active December 12, 2015 02:28
Show Gist options
  • Save josevalim/7bd4eea30cd187e68caa to your computer and use it in GitHub Desktop.
Save josevalim/7bd4eea30cd187e68caa to your computer and use it in GitHub Desktop.
-module(sample).
-export([hello/1]).
hello(X) ->
case do_something(X) of
false ->
A = false;
Res ->
{ A, B } = Res,
do_something(A),
do_something(B)
end,
ThisShouldNotFail = A,
ok.
do_something(X) ->
external:do_something(X).
crash reason: {function_clause,
[{v3_kernel,lit_vars,
[{ivalues,
[11,{file,"sample.erl"}],
[{k_var,[],ker4},{k_atom,[],ok}]}],
[{file,"v3_kernel.erl"},{line,1749}]},
{v3_kernel,uexpr,3,[{file,"v3_kernel.erl"},{line,1628}]},
{v3_kernel,ubody,3,[{file,"v3_kernel.erl"},{line,1408}]},
{v3_kernel,ubody,3,[{file,"v3_kernel.erl"},{line,1409}]},
{v3_kernel,umatch,3,[{file,"v3_kernel.erl"},{line,1716}]},
{v3_kernel,'-umatch_list/3-anonymous-0-',3,
[{file,"v3_kernel.erl"},{line,1735}]},
{v3_kernel,umatch,3,[{file,"v3_kernel.erl"},{line,1711}]},
{v3_kernel,'-umatch_list/3-anonymous-0-',3,
[{file,"v3_kernel.erl"},{line,1735}]}]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment