aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-01-30 11:20:54 +0100
committerBjörn Gustavsson <[email protected]>2013-01-30 11:35:59 +0100
commitece4c17d2288a3161c99519ae84cea530eec5bd5 (patch)
tree1b307c4b7457274e2b1f95b59544b2ce247d6936 /lib/compiler/src
parent68b804f34d4ec420d86953e3f519179a40fbee8f (diff)
downloadotp-ece4c17d2288a3161c99519ae84cea530eec5bd5.tar.gz
otp-ece4c17d2288a3161c99519ae84cea530eec5bd5.tar.bz2
otp-ece4c17d2288a3161c99519ae84cea530eec5bd5.zip
Fix crash in the compiler when compiling element(2, not_a_tuple)
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/sys_core_fold.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index d5fec0c869..07b054c5d7 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -1272,6 +1272,8 @@ eval_element(Call, #c_literal{val=Pos}, #c_var{name=V}, Types)
true ->
eval_failure(Call, badarg)
end;
+ {ok,_} ->
+ eval_failure(Call, badarg);
error ->
Call
end;