aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/core_fold_SUITE.erl
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/test/core_fold_SUITE.erl
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/test/core_fold_SUITE.erl')
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index 53a65d8d17..b905e9b126 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -69,6 +69,9 @@ t_element(Config) when is_list(Config) ->
?line {'EXIT',{badarg,_}} = (catch element(5, {a,b,c,d})),
?line {'EXIT',{badarg,_}} = (catch element(5, {a,b,X,d})),
?line {'EXIT',{badarg,_}} = (catch element(5.0, {a,b,X,d})),
+ {'EXIT',{badarg,_}} = (catch element(2, not_a_tuple)),
+ {'EXIT',{badarg,_}} = (catch element(2, [])),
+ {'EXIT',{badarg,_}} = (catch element(2, Tuple == 3)),
case id({a,b,c}) of
{_,_,_}=Tup ->
?line {'EXIT',{badarg,_}} = (catch element(4, Tup))