aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/map_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compiler/test/map_SUITE.erl')
-rw-r--r--lib/compiler/test/map_SUITE.erl15
1 files changed, 13 insertions, 2 deletions
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
index 4fc4768802..90eae6fb4f 100644
--- a/lib/compiler/test/map_SUITE.erl
+++ b/lib/compiler/test/map_SUITE.erl
@@ -43,7 +43,8 @@
%% errors in 17.0-rc1
t_update_values/1,
- t_expand_map_update/1
+ t_expand_map_update/1,
+ t_export/1
]).
suite() -> [].
@@ -70,7 +71,8 @@ all() -> [
%% errors in 17.0-rc1
t_update_values,
- t_expand_map_update
+ t_expand_map_update,
+ t_export
].
groups() -> [].
@@ -285,6 +287,12 @@ t_expand_map_update(Config) when is_list(Config) ->
#{<<"hello">> := <<"les gens">>} = M,
ok.
+t_export(Config) when is_list(Config) ->
+ Raclette = id(#{}),
+ case brie of brie -> Fromage = Raclette end,
+ Raclette = Fromage#{},
+ ok.
+
check_val(#{val1:=V1, val2:=V2},V1,V2) -> ok.
get_val(#{ "wazzup" := _, val := V}) -> V;
@@ -292,6 +300,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}),
@@ -304,6 +313,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.