aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-05-12 16:37:22 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-05-12 16:37:22 +0200
commit316cdd16e221870397ee9571609de09314749927 (patch)
tree21dd3cf2650993ec9b4373daf0f4f003092dcc38 /lib/stdlib/src
parente3507ba17f6cb0873d23899e686443b7b8b0f2c7 (diff)
parentc563f5866b42a3479050241284fffc1245aebe7d (diff)
downloadotp-316cdd16e221870397ee9571609de09314749927.tar.gz
otp-316cdd16e221870397ee9571609de09314749927.tar.bz2
otp-316cdd16e221870397ee9571609de09314749927.zip
Merge branch 'maint'
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r--lib/stdlib/src/erl_eval.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stdlib/src/erl_eval.erl b/lib/stdlib/src/erl_eval.erl
index acde3ad5d6..3cfedfee97 100644
--- a/lib/stdlib/src/erl_eval.erl
+++ b/lib/stdlib/src/erl_eval.erl
@@ -244,17 +244,17 @@ expr({record,_,_,Name,_}, _Bs, _Lf, _Ef, _RBs) ->
erlang:raise(error, {undef_record,Name}, stacktrace());
%% map
-expr({map,_, Binding,Es}, Bs0, Lf, Ef, RBs) ->
- {value, Map0, Bs1} = expr(Binding, Bs0, Lf, Ef, RBs),
+expr({map,_,Binding,Es}, Bs0, Lf, Ef, RBs) ->
+ {value, Map0, Bs1} = expr(Binding, Bs0, Lf, Ef, none),
case Map0 of
#{} ->
- {Vs,Bs} = eval_map_fields(Es, Bs1, Lf, Ef),
+ {Vs,Bs2} = eval_map_fields(Es, Bs0, Lf, Ef),
Map1 = lists:foldl(fun ({map_assoc,K,V}, Mi) ->
maps:put(K, V, Mi);
({map_exact,K,V}, Mi) ->
maps:update(K, V, Mi)
end, Map0, Vs),
- ret_expr(Map1, Bs, RBs);
+ ret_expr(Map1, merge_bindings(Bs2, Bs1), RBs);
_ ->
erlang:raise(error, {badarg,Map0}, stacktrace())
end;