aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2013-08-19 15:54:30 +0200
committerBjörn Gustavsson <[email protected]>2013-08-19 15:54:30 +0200
commit81ac8ee8eba862d4e8a12f88f15e2ee526d74dbd (patch)
tree1d7f85ce6186750f25e07527afe404f2bd1f81b4 /lib/compiler/test
parent0f01c8195a9810fe5ee881440c949ccab15c5db7 (diff)
parent8e10c8aac09de9165deb1c04cd908c8057c7f173 (diff)
downloadotp-81ac8ee8eba862d4e8a12f88f15e2ee526d74dbd.tar.gz
otp-81ac8ee8eba862d4e8a12f88f15e2ee526d74dbd.tar.bz2
otp-81ac8ee8eba862d4e8a12f88f15e2ee526d74dbd.zip
Merge branch 'bjorn/compiler/beam_bool-crash/OTP-11240' into maint
* bjorn/compiler/beam_bool-crash/OTP-11240: Fix compiler crash for 'B and B' guard
Diffstat (limited to 'lib/compiler/test')
-rw-r--r--lib/compiler/test/guard_SUITE.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl
index 5656d23090..a0a9bb7ddd 100644
--- a/lib/compiler/test/guard_SUITE.erl
+++ b/lib/compiler/test/guard_SUITE.erl
@@ -813,8 +813,16 @@ and_guard(Config) when is_list(Config) ->
?line ok = relprod({'Set',a,b}, {'Set',a,b}),
+ ok = and_same_var(42),
+ {'EXIT',{if_clause,_}} = (catch and_same_var(x)),
ok.
+and_same_var(V) ->
+ B = is_integer(V),
+ if
+ B or B -> ok
+ end.
+
relprod(R1, R2) when (erlang:size(R1) =:= 3) and (erlang:element(1,R1) =:= 'Set'), (erlang:size(R2) =:= 3) and (erlang:element(1,R2) =:= 'Set') ->
ok.