aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-01 06:52:27 +0200
committerBjörn Gustavsson <[email protected]>2017-10-01 06:52:27 +0200
commit87deee8a9513714317ce7b620d3260314aad3f1e (patch)
tree5b6aff4c7e7f92381ee3206b289169151d764e66 /lib/compiler/src
parentd0875a87fc59bea515294455b2047040118f3a7e (diff)
parent71a40658a0cef8b3e25df3a8e48a72d0563a89bf (diff)
downloadotp-87deee8a9513714317ce7b620d3260314aad3f1e.tar.gz
otp-87deee8a9513714317ce7b620d3260314aad3f1e.tar.bz2
otp-87deee8a9513714317ce7b620d3260314aad3f1e.zip
Merge branch 'maint'
* maint: Fix incorrect internal consistency failure for binary matching code
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_validator.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 00901077d3..be8908dd6b 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -1430,13 +1430,13 @@ merge_types(bool, {atom,A}) ->
merge_bool(A);
merge_types({atom,A}, bool) ->
merge_bool(A);
-merge_types(#ms{id=Id1,valid=B0,slots=Slots},
- #ms{id=Id2,valid=B1,slots=Slots}) ->
+merge_types(#ms{id=Id1,valid=B1,slots=Slots1},
+ #ms{id=Id2,valid=B2,slots=Slots2}) ->
Id = if
Id1 =:= Id2 -> Id1;
true -> make_ref()
end,
- #ms{id=Id,valid=B0 band B1,slots=Slots};
+ #ms{id=Id,valid=B1 band B2,slots=min(Slots1, Slots2)};
merge_types(T1, T2) when T1 =/= T2 ->
%% Too different. All we know is that the type is a 'term'.
term.