diff options
author | Björn Gustavsson <[email protected]> | 2013-02-04 13:53:50 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-02-04 13:53:50 +0100 |
commit | 85793776a01d283d83305ef9e5b7e9566af68b34 (patch) | |
tree | d2b61efd8b23b1a602486afb25ef5fd0a1817a7a /lib/compiler/test/core_fold_SUITE.erl | |
parent | 9b5dc27be0baab15d1bc8b583305205559d97668 (diff) | |
parent | 440b3177995914ac1dd90a84b9f625ca72e8750a (diff) | |
download | otp-85793776a01d283d83305ef9e5b7e9566af68b34.tar.gz otp-85793776a01d283d83305ef9e5b7e9566af68b34.tar.bz2 otp-85793776a01d283d83305ef9e5b7e9566af68b34.zip |
Merge branch 'bjorn/compiler/crash/OTP-10794'
* bjorn/compiler/crash/OTP-10794:
Test setelement(1, not_a_tuple, NewValue)
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.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl index 53a65d8d17..c2a592f699 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)) @@ -89,6 +92,9 @@ setelement(Config) when is_list(Config) -> ?line {'EXIT',{badarg,_}} = (catch setelement_crash({a,b,c,d,e,f})), ?line error = setelement_crash_2({a,b,c,d,e,f}, <<42>>), + + {'EXIT',{badarg,_}} = (catch setelement(1, not_a_tuple, New)), + ok. setelement_crash(Tuple) -> |