diff options
author | Hans Bolinder <[email protected]> | 2019-02-12 12:48:31 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2019-02-21 07:54:27 +0100 |
commit | f1a00ba58cbfa899d4de2a63b1dbb9a16a9f50ed (patch) | |
tree | 9eee19131252a5e3ab7b71a1c199b39b6119dfba /lib/hipe/cerl/erl_bif_types.erl | |
parent | c14e3dcce779feb3ef254a08acedae60108ad3ac (diff) | |
download | otp-f1a00ba58cbfa899d4de2a63b1dbb9a16a9f50ed.tar.gz otp-f1a00ba58cbfa899d4de2a63b1dbb9a16a9f50ed.tar.bz2 otp-f1a00ba58cbfa899d4de2a63b1dbb9a16a9f50ed.zip |
dialyzer: Fix key check of lists:key{search,member,find}()
Replace integers and floats with t_number() since keysearch et al
compare the key (rather than match).
Corrects the commit b3c8e94.
Diffstat (limited to 'lib/hipe/cerl/erl_bif_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_bif_types.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl index 799957dfdc..8ae1cd4ab7 100644 --- a/lib/hipe/cerl/erl_bif_types.erl +++ b/lib/hipe/cerl/erl_bif_types.erl @@ -2224,7 +2224,8 @@ type_order() -> [t_number(), t_atom(), t_reference(), t_fun(), t_port(), t_pid(), t_tuple(), t_map(), t_list(), t_bitstr()]. -key_comparisons_fail(X, KeyPos, TupleList, Opaques) -> +key_comparisons_fail(X0, KeyPos, TupleList, Opaques) -> + X = erl_types:t_widen_to_number(X0), lists:all(fun(Tuple) -> Key = type(erlang, element, 2, [KeyPos, Tuple]), t_is_none(t_inf(Key, X, Opaques)) |