Skip to content

Commit

Permalink
Let t_inf() substitute any() for variables in a few more cases
Browse files Browse the repository at this point in the history
The clauses handling opaque types haven't been fixed here.
  • Loading branch information
uabboli committed Aug 21, 2012
1 parent 53adc16 commit 0368962
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/hipe/cerl/erl_types.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2318,10 +2318,14 @@ t_inf(?product(_), _, _Mode) ->
?none;
t_inf(_, ?product(_), _Mode) ->
?none;
t_inf(?tuple(?any, ?any, ?any), ?tuple(_, _, _) = T, _Mode) -> T;
t_inf(?tuple(_, _, _) = T, ?tuple(?any, ?any, ?any), _Mode) -> T;
t_inf(?tuple(?any, ?any, ?any), ?tuple_set(_) = T, _Mode) -> T;
t_inf(?tuple_set(_) = T, ?tuple(?any, ?any, ?any), _Mode) -> T;
t_inf(?tuple(?any, ?any, ?any), ?tuple(_, _, _) = T, _Mode) ->
subst_all_vars_to_any(T);
t_inf(?tuple(_, _, _) = T, ?tuple(?any, ?any, ?any), _Mode) ->
subst_all_vars_to_any(T);
t_inf(?tuple(?any, ?any, ?any), ?tuple_set(_) = T, _Mode) ->
subst_all_vars_to_any(T);
t_inf(?tuple_set(_) = T, ?tuple(?any, ?any, ?any), _Mode) ->
subst_all_vars_to_any(T);
t_inf(?tuple(Elements1, Arity, _Tag1), ?tuple(Elements2, Arity, _Tag2), Mode) ->
case t_inf_lists_strict(Elements1, Elements2, Mode) of
bottom -> ?none;
Expand Down

0 comments on commit 0368962

Please sign in to comment.