diff options
author | Hans Bolinder <[email protected]> | 2016-02-09 11:40:41 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-02-09 11:40:44 +0100 |
commit | 5f7a22aa3bfb026c285a0ffa51d03048c635fc5d (patch) | |
tree | 8f61f86ea56911d86274fc58a271e6219b1d4c99 /lib/hipe/cerl | |
parent | 3c56cb7a4c3bcb8a089c0b83375aad46c010a9b7 (diff) | |
download | otp-5f7a22aa3bfb026c285a0ffa51d03048c635fc5d.tar.gz otp-5f7a22aa3bfb026c285a0ffa51d03048c635fc5d.tar.bz2 otp-5f7a22aa3bfb026c285a0ffa51d03048c635fc5d.zip |
dialyzer: Correct byte_size() and comparisons
The argument of byte_size() is a bitstring().
The code in erl_bif_types that finds cases where comparisons always
return true or false is corrected when it comes to maps and bit
strings.
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index c2fb79c089..9f23b6a9b3 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -2,7 +2,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2015. All Rights Reserved. +%% Copyright Ericsson AB 2003-2016. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -2200,7 +2200,7 @@ type_ranks(Type, I, Min, Max, [TypeClass|Rest], Opaques) -> type_order() -> [t_number(), t_atom(), t_reference(), t_fun(), t_port(), t_pid(), t_tuple(), - t_list(), t_binary()]. + t_map(), t_list(), t_bitstr()]. key_comparisons_fail(X0, KeyPos, TupleList, Opaques) -> X = case t_is_number(t_inf(X0, t_number(), Opaques), Opaques) of @@ -2300,7 +2300,7 @@ arg_types(erlang, bit_size, 1) -> [t_bitstr()]; %% Guard bif, needs to be here. arg_types(erlang, byte_size, 1) -> - [t_binary()]; + [t_bitstr()]; arg_types(erlang, disconnect_node, 1) -> [t_node()]; arg_types(erlang, halt, 0) -> |