diff options
author | Anthony Ramine <[email protected]> | 2014-03-01 16:27:06 +0100 |
---|---|---|
committer | Anthony Ramine <[email protected]> | 2014-03-01 16:27:06 +0100 |
commit | 974de0f23a9f818a2c40cb47d24ebf8d8f8b01d7 (patch) | |
tree | 948b5ad0ed37e1dc6ea874ce130dec3e9b4ec4c2 /lib/compiler/src/sys_pre_expand.erl | |
parent | db911c1f15372d2dadf06e8502506b0936a4fbb3 (diff) | |
download | otp-974de0f23a9f818a2c40cb47d24ebf8d8f8b01d7.tar.gz otp-974de0f23a9f818a2c40cb47d24ebf8d8f8b01d7.tar.bz2 otp-974de0f23a9f818a2c40cb47d24ebf8d8f8b01d7.zip |
Fix expansion of map update arguments
Reported-by: José Valim
Diffstat (limited to 'lib/compiler/src/sys_pre_expand.erl')
-rw-r--r-- | lib/compiler/src/sys_pre_expand.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl index 9998043013..91a46a20fe 100644 --- a/lib/compiler/src/sys_pre_expand.erl +++ b/lib/compiler/src/sys_pre_expand.erl @@ -331,9 +331,10 @@ expr({tuple,Line,Es0}, St0) -> expr({map,Line,Es0}, St0) -> {Es1,St1} = expr_list(Es0, St0), {{map,Line,Es1},St1}; -expr({map,Line,Var,Es0}, St0) -> - {Es1,St1} = expr_list(Es0, St0), - {{map,Line,Var,Es1},St1}; +expr({map,Line,E0,Es0}, St0) -> + {E1,St1} = expr(E0, St0), + {Es1,St2} = expr_list(Es0, St1), + {{map,Line,E1,Es1},St2}; expr({map_field_assoc,Line,K0,V0}, St0) -> {K,St1} = expr(K0, St0), {V,St2} = expr(V0, St1), |