diff --git a/src/de/dhbwstuttgart/typeinference/unify/Unify.java b/src/de/dhbwstuttgart/typeinference/unify/Unify.java index 4cfc0fbee..234314eb1 100755 --- a/src/de/dhbwstuttgart/typeinference/unify/Unify.java +++ b/src/de/dhbwstuttgart/typeinference/unify/Unify.java @@ -1376,6 +1376,25 @@ throws MatchException //erledigt 15-02-03 if(P.OperatorEqual()) { + + //PL 15-02-08 bisher mit keinem Beispiel getestet + if(P.TA1 instanceof WildcardType && ((WildcardType)P.TA1).GetWildcardType() instanceof TypePlaceholder + && (P.TA2 instanceof GenericTypeVar || P.TA2 instanceof RefType)) + { + H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),P.TA2, PairOperator.Equal)); + bRegel = true; + continue; + } + + //PL 15-02-08 bisher mit keinem Beispiel getestet + if((P.TA1 instanceof GenericTypeVar || P.TA1 instanceof RefType) + && (P.TA2 instanceof WildcardType && ((WildcardType)P.TA2).GetWildcardType() instanceof TypePlaceholder)) + { + H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),P.TA2, PairOperator.Equal)); + bRegel = true; + continue; + } + //wenn noetig extends-wildcards entfernen PL 15-02-03 //korrekt da P.OperatorEqual() @@ -1500,7 +1519,7 @@ throws MatchException continue; } - if (P.OperatorSmallerExtends()) //PL 15-02-03 Es muessen noch + if (P.OperatorSmallerExtends()) //PL 15-02-03 Es muessen noch alle Fälle betrachtet werden. { if(P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType) { @@ -1534,6 +1553,24 @@ throws MatchException continue; } + + //PL 15-02-08 + if(P.TA1 instanceof WildcardType && ((WildcardType)P.TA1).GetWildcardType() instanceof TypePlaceholder + && (P.TA2 instanceof GenericTypeVar || P.TA2 instanceof RefType)) + { + H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),P.TA2, PairOperator.Equal)); + bRegel = true; + continue; + } + + //PL 15-02-08 bisher mit keinem Beispiel getestet + if((P.TA1 instanceof GenericTypeVar || P.TA1 instanceof RefType) + && (P.TA2 instanceof WildcardType && ((WildcardType)P.TA2).GetWildcardType() instanceof TypePlaceholder)) + { + H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),P.TA2, PairOperator.Equal)); + bRegel = true; + continue; + } } // Subst --> noch zu pr�fen