diff options
author | Hans Bolinder <[email protected]> | 2015-08-24 08:28:42 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2015-08-24 08:28:42 +0200 |
commit | f81065c4296c679bfdd023e988289b4d884cfdd2 (patch) | |
tree | e846ea7a1349677457a28f7bbde297b46e3f063a /lib/hipe/cerl/erl_types.erl | |
parent | 378f70052f13ae607eebd5aebd7e978dc48a4c53 (diff) | |
parent | e409bd71d9aec56dec9f111966d1ca99d2537c41 (diff) | |
download | otp-f81065c4296c679bfdd023e988289b4d884cfdd2.tar.gz otp-f81065c4296c679bfdd023e988289b4d884cfdd2.tar.bz2 otp-f81065c4296c679bfdd023e988289b4d884cfdd2.zip |
Merge branch 'maint'
* maint:
hipe/dialyzer: Fix a bug concerning opaque types and keydelete/3
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; |