aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorGustav Simonsson <[email protected]>2012-03-15 10:31:34 +0100
committerGustav Simonsson <[email protected]>2012-03-15 10:31:34 +0100
commitb99ff6a992770ea14506079fd2c656210bc912c9 (patch)
treee9c8653c88b0502dd2246130615baa226d9ba9cc /lib/hipe/cerl
parent195a9fe1a07a9aa439e6ea1cd4f7e548267253b4 (diff)
parent3cc9dc31c5935168051286d524618b2b64795498 (diff)
downloadotp-b99ff6a992770ea14506079fd2c656210bc912c9.tar.gz
otp-b99ff6a992770ea14506079fd2c656210bc912c9.tar.bz2
otp-b99ff6a992770ea14506079fd2c656210bc912c9.zip
Merge branch 'sa/dialyzer-fixes' into maint
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_types.erl11
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};