aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-10-28 15:08:05 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-10-28 15:08:05 +0100
commit6e30d2a47c2a2bded04b2a411161147cba7aca51 (patch)
treea9a6b59b2807b25277e4b8323987b2c7d30e08c2 /lib/stdlib/src
parentb1c1a40410c62273dd00e9ca1e29cf3056d41b67 (diff)
parenta2ffd6fd0e7f693847450aa633f7a4a18f9baead (diff)
downloadotp-6e30d2a47c2a2bded04b2a411161147cba7aca51.tar.gz
otp-6e30d2a47c2a2bded04b2a411161147cba7aca51.tar.bz2
otp-6e30d2a47c2a2bded04b2a411161147cba7aca51.zip
Merge branch 'egil/nox/maps-match_specs/OTP-12270'
* egil/nox/maps-match_specs/OTP-12270: erts: Fix return value from erts_maps_get to be const Properly support maps in match_specs Support maps in ms_transform Return pointer to value in erts_maps_get()
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/ms_transform.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl
index 27dfcf52e1..e671dcd8cf 100644
--- a/lib/stdlib/src/ms_transform.erl
+++ b/lib/stdlib/src/ms_transform.erl
@@ -1079,6 +1079,12 @@ normalise({cons,_,Head,Tail}) ->
[normalise(Head)|normalise(Tail)];
normalise({tuple,_,Args}) ->
list_to_tuple(normalise_list(Args));
+normalise({map,_,Pairs0}) ->
+ Pairs1 = lists:map(fun ({map_field_exact,_,K,V}) ->
+ {normalise(K),normalise(V)}
+ end,
+ Pairs0),
+ maps:from_list(Pairs1);
%% Special case for unary +/-.
normalise({op,_,'+',{char,_,I}}) -> I;
normalise({op,_,'+',{integer,_,I}}) -> I;