diff options
author | Stavros Aronis <[email protected]> | 2014-03-21 17:06:24 +0100 |
---|---|---|
committer | Stavros Aronis <[email protected]> | 2014-03-24 16:23:13 +0100 |
commit | a360c3e6cdcc54fe040a1aef157eb1489ab4bdb3 (patch) | |
tree | 8dd11283daddce3156abc0af6fd198ebeac598a3 /lib/hipe | |
parent | 73af231f1a22083031df49ba19fdfd4f6b434a10 (diff) | |
download | otp-a360c3e6cdcc54fe040a1aef157eb1489ab4bdb3.tar.gz otp-a360c3e6cdcc54fe040a1aef157eb1489ab4bdb3.tar.bz2 otp-a360c3e6cdcc54fe040a1aef157eb1489ab4bdb3.zip |
Don't 'opaque-decorate' a success typing using an incompatible spec
Without this patch Dialyzer crashes when analyzing the supplemented test case.
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/cerl/erl_types.erl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl index aa69b57fa2..2d86f166cd 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]). |