aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-06-26 19:28:59 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-08-26 12:12:48 +0200
commit9870cec36b633c3787007e3acd6cebb03fa8545b (patch)
tree41db14af9c53cf2a8939d13d2f592b57d2a2e1ed /lib/compiler
parentbbabf6204d9ac7083828ced6b9ace97e240794c8 (diff)
downloadotp-9870cec36b633c3787007e3acd6cebb03fa8545b.tar.gz
otp-9870cec36b633c3787007e3acd6cebb03fa8545b.tar.bz2
otp-9870cec36b633c3787007e3acd6cebb03fa8545b.zip
compiler: Shameless v3_core hack for variables
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/src/v3_core.erl6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index ec974cd383..9f1f3b635c 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -772,7 +772,11 @@ expr_map(M0,Es0,A,St0) ->
%% M3 = M2#{ K2 := 42 }
map_build_pair_chain(M,Es,A,St) ->
- map_build_pair_chain(M,Es,A,St,[]).
+ %% hack, remove iset if only literal
+ case map_build_pair_chain(M,Es,A,St,[]) of
+ {_,[#iset{arg=#c_literal{}=Val}],St1} -> {Val,[],St1};
+ Normal -> Normal
+ end.
map_build_pair_chain(M0,[],_,St,Mps) ->
{M0,Mps,St};