diff options
author | Björn-Egil Dahlberg <[email protected]> | 2014-03-26 14:19:55 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2014-03-26 14:19:55 +0100 |
commit | c5e3c774bd12cc15a04dd9880cad6eb66d2541be (patch) | |
tree | f2794368409e9af8854cd6a87c5c1e90c64ab97b /lib/compiler/src/v3_codegen.erl | |
parent | dbd429512ba3fe2db4dcca1a8d9357d173718e63 (diff) | |
parent | 2d95280094fa6429081a9b9df3c73705819e2461 (diff) | |
download | otp-c5e3c774bd12cc15a04dd9880cad6eb66d2541be.tar.gz otp-c5e3c774bd12cc15a04dd9880cad6eb66d2541be.tar.bz2 otp-c5e3c774bd12cc15a04dd9880cad6eb66d2541be.zip |
Merge branch 'egil/maps-compiler-coverage'
* egil/maps-compiler-coverage:
compiler: Do not evaluate map expressions with bad keys
compiler: Throw 'nomatch' on matching with bad binary keys
compiler: Variable keys are not allowed in Maps
compiler: Strengthen Maps warnings tests
compiler: map_pair cannot be a type clause in v3_life
compiler: Remove redudant code in v3_codegen
compiler: Test deep map structure
compiler: Remove redundant clause in v3_codegen
compiler: Cover #{ [] => Var } in testcase
Diffstat (limited to 'lib/compiler/src/v3_codegen.erl')
-rw-r--r-- | lib/compiler/src/v3_codegen.erl | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl index f1331d1fe7..47a357c23d 100644 --- a/lib/compiler/src/v3_codegen.erl +++ b/lib/compiler/src/v3_codegen.erl @@ -960,7 +960,6 @@ select_extract_map(Src, Vs, Fail, I, Vdb, Bef, St) -> end, {{[],[]},Bef}, Vs), Code = case {HasKs,GetVs} of - {[],[]} -> {[],Aft,St}; {HasKs,[]} -> [{test,has_map_fields,{f,Fail},Rsrc,{list,HasKs}}]; {[],GetVs} -> @@ -1553,8 +1552,7 @@ map_pair_strip_and_termsort(Es) -> Ls = [{K,V}||{_,K,V}<-Es], lists:sort(fun ({{_,A},_}, {{_,B},_}) -> erts_internal:cmp_term(A,B) =< 0; ({nil,_}, {{_,B},_}) -> [] =< B; - ({{_,A},_}, {nil,_}) -> A =< []; - ({nil,_}, {nil,_}) -> true + ({{_,A},_}, {nil,_}) -> A =< [] end, Ls). %%% |