aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/map_SUITE.erl
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2014-03-03 14:12:20 +0100
committerAnthony Ramine <n.oxyde@gmail.com>2014-03-06 10:44:13 +0100
commit35f6804946b22ef9a813c27780d4760c157a3c3d (patch)
treef379c1671edb5d65ace4deba437373087fae7ca9 /lib/compiler/test/map_SUITE.erl
parent4a28c972a710461568f4e610dffc09de221aaa44 (diff)
downloadotp-35f6804946b22ef9a813c27780d4760c157a3c3d.tar.gz
otp-35f6804946b22ef9a813c27780d4760c157a3c3d.tar.bz2
otp-35f6804946b22ef9a813c27780d4760c157a3c3d.zip
Properly collect labels in put_map instructions in beam_jump
Reported-by: Ulf Norell
Diffstat (limited to 'lib/compiler/test/map_SUITE.erl')
-rw-r--r--lib/compiler/test/map_SUITE.erl3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
index 3639192a51..115ba25525 100644
--- a/lib/compiler/test/map_SUITE.erl
+++ b/lib/compiler/test/map_SUITE.erl
@@ -287,6 +287,7 @@ get_val(#{ val := V }) -> {some_val, V}.
t_guard_bifs(Config) when is_list(Config) ->
true = map_guard_empty(),
+ true = map_guard_empty_2(),
true = map_guard_head(#{a=>1}),
false = map_guard_head([]),
true = map_guard_body(#{a=>1}),
@@ -297,6 +298,8 @@ t_guard_bifs(Config) when is_list(Config) ->
map_guard_empty() when is_map(#{}); false -> true.
+map_guard_empty_2() when true; #{} andalso false -> true.
+
map_guard_head(M) when is_map(M) -> true;
map_guard_head(_) -> false.