aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/map_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-29 09:40:42 +0100
committerBjörn Gustavsson <[email protected]>2015-01-29 09:40:42 +0100
commit47f77f2576ca02243ed22d9e42b09eb7415ee3a1 (patch)
tree853c99efa58482ed03182593ad3f3c5b77b6c384 /lib/compiler/test/map_SUITE.erl
parentf5aa1d9943fbf401fed9799c204e893d0d4b4644 (diff)
parent70478d290046844b504c8fe0643e499009b735b4 (diff)
downloadotp-47f77f2576ca02243ed22d9e42b09eb7415ee3a1.tar.gz
otp-47f77f2576ca02243ed22d9e42b09eb7415ee3a1.tar.bz2
otp-47f77f2576ca02243ed22d9e42b09eb7415ee3a1.zip
Merge branch 'bjorn/compiler/map-fixes'
* bjorn/compiler/map-fixes: cerl: Remove a clause in fold_map_pairs/3 that will never be reached Move grouping of map constructions from v3_core to v3_kernel core_pp: Correct printing of map literals Strengthen and modernize compile_SUITE core_parse: Always fold literal conses cerl: Make sure that we preserve the invariants for maps cerl_clauses: Fix indentation sys_core_fold: Strengthen optimization of letrecs in effect context Fix handling of binary map keys in comprehensions core_lib: Teach is_var_used/2 to handle keys in map patterns warnings_SUITE: Eliminate compiler warning for a shadowed variable lc_SUITE: Add shadow/1 Modernize lc_SUITE
Diffstat (limited to 'lib/compiler/test/map_SUITE.erl')
-rw-r--r--lib/compiler/test/map_SUITE.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
index dbac61765b..bc5ae803c6 100644
--- a/lib/compiler/test/map_SUITE.erl
+++ b/lib/compiler/test/map_SUITE.erl
@@ -319,6 +319,12 @@ t_update_exact(Config) when is_list(Config) ->
{'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
{'EXIT',{badarg,_}} = (catch <<>>#{nonexisting:=val}),
{'EXIT',{badarg,_}} = (catch M0#{<<0:257>> := val}), %% limitation
+
+ %% A workaround for a bug allowed an empty map to be updated.
+ {'EXIT',{badarg,_}} = (catch (id(#{}))#{a:=1}),
+ {'EXIT',{badarg,_}} = (catch #{}#{a:=1}),
+ Empty = #{},
+ {'EXIT',{badarg,_}} = (catch Empty#{a:=1}),
ok.
t_update_values(Config) when is_list(Config) ->