aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/cerl
diff options
context:
space:
mode:
authorStavros Aronis <[email protected]>2011-12-22 16:38:21 +0200
committerStavros Aronis <[email protected]>2012-02-22 13:04:27 +0100
commit2f8daabdbdd3d03a4db8e1680a8b2773f0561d5e (patch)
tree0e75e4613ecb7d3e263f83077d89414c722de785 /lib/hipe/cerl
parent8900a242fb35212b64b6b4246caa0ace128ca9b4 (diff)
downloadotp-2f8daabdbdd3d03a4db8e1680a8b2773f0561d5e.tar.gz
otp-2f8daabdbdd3d03a4db8e1680a8b2773f0561d5e.tar.bz2
otp-2f8daabdbdd3d03a4db8e1680a8b2773f0561d5e.zip
Allow t_opaque_structure to handle multiple opaque types
Diffstat (limited to 'lib/hipe/cerl')
-rw-r--r--lib/hipe/cerl/erl_types.erl7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 620fed365e..aa4758c1d3 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().