aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/erl_expand_records.erl
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-04-02 17:00:43 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-04-03 14:32:44 +0200
commitcc7a3c5896bc266bb97287dd4e31b696d8cf604f (patch)
treed19e07f7b30e2723184e1789f9113f6060428a15 /lib/stdlib/src/erl_expand_records.erl
parenteba291a52d4a78c128c5802775fa1bff187e0604 (diff)
downloadotp-cc7a3c5896bc266bb97287dd4e31b696d8cf604f.tar.gz
otp-cc7a3c5896bc266bb97287dd4e31b696d8cf604f.tar.bz2
otp-cc7a3c5896bc266bb97287dd4e31b696d8cf604f.zip
compiler,stdlib: Fix Map literals as keys for Maps in patterns
Diffstat (limited to 'lib/stdlib/src/erl_expand_records.erl')
-rw-r--r--lib/stdlib/src/erl_expand_records.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stdlib/src/erl_expand_records.erl b/lib/stdlib/src/erl_expand_records.erl
index f53c6e1278..57e768ba9d 100644
--- a/lib/stdlib/src/erl_expand_records.erl
+++ b/lib/stdlib/src/erl_expand_records.erl
@@ -135,10 +135,10 @@ pattern({tuple,Line,Ps}, St0) ->
pattern({map,Line,Ps}, St0) ->
{TPs,St1} = pattern_list(Ps, St0),
{{map,Line,TPs},St1};
-pattern({map_field_exact,Line,Key0,V0}, St0) ->
- {Key,St1} = pattern(Key0, St0),
+pattern({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
{V,St2} = pattern(V0, St1),
- {{map_field_exact,Line,Key,V},St2};
+ {{map_field_exact,Line,K,V},St2};
%%pattern({struct,Line,Tag,Ps}, St0) ->
%% {TPs,TPsvs,St1} = pattern_list(Ps, St0),
%% {{struct,Line,Tag,TPs},TPsvs,St1};