aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/map_SUITE_data/badmap_17.erl
blob: 0ec65e0e3398e3f98efb35692fc06eb8bc84e1b6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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}.