From c080f452ae5e2173775e716a2cf607cd02f64c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Pl=C3=BCmicke?= Date: Wed, 1 Apr 2015 01:28:15 +0200 Subject: [PATCH] Bug 18: ? ext/sup ty1 = ? ext/sup ty2 wird reduziert zu ty1 = ty2 --- src/de/dhbwstuttgart/typeinference/unify/Unify.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index e22e56b6..75039c68 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -622,7 +622,7 @@ public class Unify //Schritt 4, Teil 2: Kartesisches Produkt bilden. //Hier wird aus den in Schritt 4, Teil 1 erzeugten Vektoren das Kartesische Produkt gebilden. Vector helpvp; - Vector> bigCartProductErg = new Vector>(); + Vector> bigCartProductErg = new Vector>(); bigCartProductErg.addElement(copyVectorPair(Eq1)); for (Vector> vecvecpair : cartProduktSets) @@ -1282,6 +1282,13 @@ throws MatchException //erledigt 15-02-03 if(P.OperatorEqual()) { + if((P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType) || //PL 15-03-31 eingefuegt + (P.TA1 instanceof SuperWildcardType && P.TA2 instanceof SuperWildcardType)) + { + H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(), ((WildcardType)P.TA2).GetWildcardType(), PairOperator.Equal)); + bRegel = true; + continue; + } ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //PL 15-03-05: Ich halte dies fuer falsch ////PL 15-02-08 bisher mit keinem Beispiel getestet