aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/map_SUITE_data/badmap_17.erl
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/test/map_SUITE_data/badmap_17.erl')
-rw-r--r--erts/emulator/test/map_SUITE_data/badmap_17.erl26
1 files changed, 26 insertions, 0 deletions
diff --git a/erts/emulator/test/map_SUITE_data/badmap_17.erl b/erts/emulator/test/map_SUITE_data/badmap_17.erl
new file mode 100644
index 0000000000..0ec65e0e33
--- /dev/null
+++ b/erts/emulator/test/map_SUITE_data/badmap_17.erl
@@ -0,0 +1,26 @@
+-module(badmap_17).
+-export([update/1]).
+
+%% Compile this source file with OTP 17.
+
+update(Map) ->
+ try
+ update_1(Map),
+ error(update_did_not_fail)
+ catch
+ error:{badmap,Map} ->
+ ok
+ end,
+ try
+ update_2(Map),
+ error(update_did_not_fail)
+ catch
+ error:{badmap,Map} ->
+ ok
+ end.
+
+update_1(M) ->
+ M#{a=>42}.
+
+update_2(M) ->
+ M#{a:=42}.