From 5436de7707970f89ecee7ff649bc8ab6b99f8f36 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Mon, 3 Mar 2014 14:12:20 +0100 Subject: Properly collect labels in put_map instructions in beam_bool Reported-by: Ulf Norell --- lib/compiler/test/map_SUITE.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/compiler/test/map_SUITE.erl') diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl index b4baef461b..f47a94e033 100644 --- a/lib/compiler/test/map_SUITE.erl +++ b/lib/compiler/test/map_SUITE.erl @@ -279,6 +279,7 @@ get_val(#{ "wazzup" := _, val := V}) -> V; get_val(#{ val := V }) -> {some_val, V}. t_guard_bifs(Config) when is_list(Config) -> + true = map_guard_empty(), true = map_guard_head(#{a=>1}), false = map_guard_head([]), true = map_guard_body(#{a=>1}), @@ -287,6 +288,8 @@ t_guard_bifs(Config) when is_list(Config) -> false = map_guard_pattern("list"), ok. +map_guard_empty() when is_map(#{}); false -> true. + map_guard_head(M) when is_map(M) -> true; map_guard_head(_) -> false. -- cgit v1.2.3