diff options
author | Björn Gustavsson <[email protected]> | 2013-08-19 16:00:03 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2013-08-19 16:00:03 +0200 |
commit | 627f658bb7a53cdbfe862ca3aa5d66259bbaead7 (patch) | |
tree | 8e48cfeb7368871c82b8a93ea3baa20e903ca7e2 /lib/compiler/test | |
parent | b3068b837fc5d82a0cf49d57b20d3b6d4ef8ea2d (diff) | |
parent | 81ac8ee8eba862d4e8a12f88f15e2ee526d74dbd (diff) | |
download | otp-627f658bb7a53cdbfe862ca3aa5d66259bbaead7.tar.gz otp-627f658bb7a53cdbfe862ca3aa5d66259bbaead7.tar.bz2 otp-627f658bb7a53cdbfe862ca3aa5d66259bbaead7.zip |
Merge branch 'maint'
* maint:
Fix compiler crash for 'B and B' guard
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/guard_SUITE.erl | 8 |
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. |