diff options
author | Gustav Simonsson <[email protected]> | 2012-03-15 11:35:20 +0100 |
---|---|---|
committer | Gustav Simonsson <[email protected]> | 2012-03-15 11:35:20 +0100 |
commit | d789eb25f5e426c5eeeac738ec687e61fe5984ac (patch) | |
tree | d6779a22a3b0d491622e389d848d34919c501cb5 /lib/hipe/cerl | |
parent | 5770544e06548e5aec265eaca487429bcf332b42 (diff) | |
parent | db9c249a0dd1c948f9bcbc47df166c13e7856357 (diff) | |
download | otp-d789eb25f5e426c5eeeac738ec687e61fe5984ac.tar.gz otp-d789eb25f5e426c5eeeac738ec687e61fe5984ac.tar.bz2 otp-d789eb25f5e426c5eeeac738ec687e61fe5984ac.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index 620fed365e..65b9a057de 100644 --- a/lib/hipe/cerl/erl_types.erl +++ b/lib/hipe/cerl/erl_types.erl @@ -424,12 +424,7 @@ t_has_opaque_subtype(T) -> -spec t_opaque_structure(erl_type()) -> erl_type(). t_opaque_structure(?opaque(Elements)) -> - case ordsets:size(Elements) of - 1 -> - [#opaque{struct = Struct}] = ordsets:to_list(Elements), - Struct; - _ -> throw({error, "Unexpected multiple opaque types"}) - end. + t_sup([Struct || #opaque{struct = Struct} <- ordsets:to_list(Elements)]). -spec t_opaque_module(erl_type()) -> module(). @@ -688,9 +683,9 @@ t_solve_remote(?opaque(Set), ET, R, C) -> {NewList, RR} = opaques_solve_remote(List, ET, R, C), {?opaque(ordsets:from_list(NewList)), RR}; t_solve_remote(?tuple(?any, _, _) = T, _ET, _R, _C) -> {T, []}; -t_solve_remote(?tuple(Types, Arity, Tag), ET, R, C) -> +t_solve_remote(?tuple(Types, _Arity, _Tag), ET, R, C) -> {RL, RR} = list_solve_remote(Types, ET, R, C), - {?tuple(RL, Arity, Tag), RR}; + {t_tuple(RL), RR}; t_solve_remote(?tuple_set(Set), ET, R, C) -> {NewSet, RR} = tuples_solve_remote(Set, ET, R, C), {?tuple_set(NewSet), RR}; |