aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-02-04 08:05:09 +0100
committerBjörn Gustavsson <[email protected]>2015-03-09 09:59:37 +0100
commit03f79ba054b5509a05b164220f7d218d278298df (patch)
treef0e639cb62765a2d2eddc8b2980b451991ba8a16 /lib/compiler/test
parent5e07cf899d657a787e7d4f32c1ad7f44037a011f (diff)
downloadotp-03f79ba054b5509a05b164220f7d218d278298df.tar.gz
otp-03f79ba054b5509a05b164220f7d218d278298df.tar.bz2
otp-03f79ba054b5509a05b164220f7d218d278298df.zip
Clean up evaluation of setelement/3
The 'try' ... 'catch' is problematic. Firstly, if no optimization is possible, an exception will always be thrown. Secondly, bugs in the code will go unnoticed.
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index 9228aa7fd1..bc82eaf5aa 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -107,6 +107,7 @@ setelement(Config) when is_list(Config) ->
?line error = setelement_crash_2({a,b,c,d,e,f}, <<42>>),
{'EXIT',{badarg,_}} = (catch setelement(1, not_a_tuple, New)),
+ {'EXIT',{badarg,_}} = (catch setelement(3, {a,b}, New)),
ok.