aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2014-03-26 08:31:27 +0100
committerHans Bolinder <[email protected]>2014-03-26 08:31:27 +0100
commit4057cf67d8f4c42992efc61790225d394a8709a2 (patch)
tree72a445178e8ff1be3a32daa3cd46b67993f42a3b /lib/hipe
parentd54ef284388e4e5148be8de51ba2f9ebc2e3285e (diff)
parenta360c3e6cdcc54fe040a1aef157eb1489ab4bdb3 (diff)
downloadotp-4057cf67d8f4c42992efc61790225d394a8709a2.tar.gz
otp-4057cf67d8f4c42992efc61790225d394a8709a2.tar.bz2
otp-4057cf67d8f4c42992efc61790225d394a8709a2.zip
Merge branch 'aronisstav/hipe/opaque_fix'
* aronisstav/hipe/opaque_fix: Don't 'opaque-decorate' a success typing using an incompatible spec
Diffstat (limited to 'lib/hipe')
-rw-r--r--lib/hipe/cerl/erl_types.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index 5938d94e65..28281a2fac 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -618,7 +618,7 @@ t_decorate_with_opaque(T1, T2, Opaques) ->
end
end.
-decorate(?none=Type, _, _Opaques) -> Type;
+decorate(Type, ?none, _Opaques) -> Type;
decorate(?function(Domain, Range), ?function(D, R), Opaques) ->
?function(decorate(Domain, D, Opaques), decorate(Range, R, Opaques));
decorate(?list(Types, Tail, Size), ?list(Ts, Tl, _Sz), Opaques) ->
@@ -684,6 +684,7 @@ union_decorate(U1, U2, Opaques) ->
List = [A,B,F,I,L,N,T,M,Map],
DecList = [Dec ||
E <- List,
+ not t_is_none(E),
not t_is_none(Dec = decorate(E, Opaque, Opaques))],
t_sup([Union|DecList]).