aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-06-04 15:13:49 +0200
committerBjörn Gustavsson <[email protected]>2018-08-17 09:50:58 +0200
commit684d07d0e21a31a6c166dda8aa3e444d217cb9d5 (patch)
tree6e4829b76e983ab2fb6d72cfd5043e894581ca3f
parent526e0474f7038f4a8a6e1ba8972b1014316058b5 (diff)
downloadotp-684d07d0e21a31a6c166dda8aa3e444d217cb9d5.tar.gz
otp-684d07d0e21a31a6c166dda8aa3e444d217cb9d5.tar.bz2
otp-684d07d0e21a31a6c166dda8aa3e444d217cb9d5.zip
beam_validator: Improve merge of cons and literal list
-rw-r--r--lib/compiler/src/beam_validator.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 1c1c02cf15..87ddd578e8 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -1656,6 +1656,12 @@ merge_types(bool, {atom,A}) ->
merge_bool(A);
merge_types({atom,A}, bool) ->
merge_bool(A);
+merge_types(cons, {literal,[_|_]}) ->
+ cons;
+merge_types({literal,[_|_]}, cons) ->
+ cons;
+merge_types({literal,[_|_]}, {literal,[_|_]}) ->
+ cons;
merge_types(#ms{id=Id1,valid=B1,slots=Slots1},
#ms{id=Id2,valid=B2,slots=Slots2}) ->
Id = if