diff options
author | Hans Bolinder <[email protected]> | 2015-08-21 11:54:30 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-08-21 12:03:16 +0200 |
commit | d57dea02cc2196ff6160471d06297413af5e20f2 (patch) | |
tree | 81144874ea0163b1bb00ada42285d21d1843e062 /lib/hipe/cerl/erl_types.erl | |
parent | 6633afcb23e36c77cab56f18a4d327b368513e48 (diff) | |
download | otp-d57dea02cc2196ff6160471d06297413af5e20f2.tar.gz otp-d57dea02cc2196ff6160471d06297413af5e20f2.tar.bz2 otp-d57dea02cc2196ff6160471d06297413af5e20f2.zip |
hipe/dialyzer: Fix a bug concerning opaque types and keydelete/3
Thanks to ILYA Khlopotov for pointing the bug out.
Diffstat (limited to 'lib/hipe/cerl/erl_types.erl')
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index a28dfb9e05..cc4fee0853 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -150,7 +150,7 @@ t_list/0, t_list/1, t_list_elements/1, t_list_elements/2, - t_list_termination/1, + t_list_termination/1, t_list_termination/2, t_map/0, t_map/1, t_matchstate/0, @@ -209,7 +209,7 @@ record_field_diffs_to_string/2, subst_all_vars_to_any/1, subst_all_remote/2, - lift_list_to_pos_empty/1, + lift_list_to_pos_empty/1, lift_list_to_pos_empty/2, is_opaque_type/2, is_erl_type/1, atom_to_string/1 @@ -1510,6 +1510,11 @@ t_list_elements(Type, Opaques) -> list_elements(?list(Contents, _, _)) -> Contents; list_elements(?nil) -> ?none. +-spec t_list_termination(erl_type(), opaques()) -> erl_type(). + +t_list_termination(Type, Opaques) -> + do_opaque(Type, Opaques, fun t_list_termination/1). + -spec t_list_termination(erl_type()) -> erl_type(). t_list_termination(?nil) -> ?nil; @@ -1585,6 +1590,11 @@ is_maybe_improper_list(_) -> false. %% %% false = t_is_subtype(t_nil(), Termination), %% ?list(Content, Termination, ?any). +-spec lift_list_to_pos_empty(erl_type(), opaques()) -> erl_type(). + +lift_list_to_pos_empty(Type, Opaques) -> + do_opaque(Type, Opaques, fun lift_list_to_pos_empty/1). + -spec lift_list_to_pos_empty(erl_type()) -> erl_type(). lift_list_to_pos_empty(?nil) -> ?nil; |