aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Högberg <[email protected]>2019-02-26 17:55:10 +0100
committerJohn Högberg <[email protected]>2019-02-27 11:57:24 +0100
commit3cc0f9cb0fe75e28d9b0fecd242b917b6bbabc0c (patch)
treea4e466be6988fbd843d7ec59e3411f2d192dfbfa /lib
parent9f48a7e7d39c3aa7266a9f9a1db07accbb185a67 (diff)
downloadotp-3cc0f9cb0fe75e28d9b0fecd242b917b6bbabc0c.tar.gz
otp-3cc0f9cb0fe75e28d9b0fecd242b917b6bbabc0c.tar.bz2
otp-3cc0f9cb0fe75e28d9b0fecd242b917b6bbabc0c.zip
beam_validator: Disregard 'none' on join
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/src/beam_validator.erl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index b70cd30a33..05920461b4 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -2103,6 +2103,10 @@ merge_y_regs_1(_, _, Regs) -> Regs.
%% join(Type1, Type2) -> Type
%% Return the most specific type possible.
%% Note: Type1 must NOT be the same as Type2.
+join(none, Other) ->
+ Other;
+join(Other, none) ->
+ Other;
join({literal,_}=T1, T2) ->
join_literal(T1, T2);
join(T1, {literal,_}=T2) ->