aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-01-29 13:00:18 +0100
committerBjörn Gustavsson <[email protected]>2018-01-29 15:29:06 +0100
commitc455dc2ca108e8ffbf5431068223fcff8aeb5361 (patch)
treec0d7b7a54b9d5091e6b897b87e5c76e1ce2a14f3 /lib/compiler/src
parentdb9e04d0f4337a2b32376a41275ecedfe0258c1f (diff)
downloadotp-c455dc2ca108e8ffbf5431068223fcff8aeb5361.tar.gz
otp-c455dc2ca108e8ffbf5431068223fcff8aeb5361.tar.bz2
otp-c455dc2ca108e8ffbf5431068223fcff8aeb5361.zip
Fix incorrect type interference of integer ranges
Diffstat (limited to 'lib/compiler/src')
-rw-r--r--lib/compiler/src/beam_type.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/compiler/src/beam_type.erl b/lib/compiler/src/beam_type.erl
index c8abfa524f..fc2c7a991b 100644
--- a/lib/compiler/src/beam_type.erl
+++ b/lib/compiler/src/beam_type.erl
@@ -914,10 +914,10 @@ merge_type_info({tuple,Sz1,[]}, {tuple,_Sz2,First}=Tuple2) ->
merge_type_info({tuple,Sz1,First}, Tuple2);
merge_type_info({tuple,_Sz1,First}=Tuple1, {tuple,Sz2,_}) ->
merge_type_info(Tuple1, {tuple,Sz2,First});
-merge_type_info(integer, {integer,_}=Int) ->
- Int;
-merge_type_info({integer,_}=Int, integer) ->
- Int;
+merge_type_info(integer, {integer,_}) ->
+ integer;
+merge_type_info({integer,_}, integer) ->
+ integer;
merge_type_info({integer,{Min1,Max1}}, {integer,{Min2,Max2}}) ->
{integer,{max(Min1, Min2),min(Max1, Max2)}};
merge_type_info(NewType, _) ->