forked from JavaTX/JavaCompilerCore
Unify.subunify wildcards werden entfernt, wenn sie auf beiden Seiten identisch sind
This commit is contained in:
parent
a549843f05
commit
1b1a690212
@ -1178,7 +1178,33 @@ throws MatchException
|
||||
inferencelog.debug("");
|
||||
inferencelog.debug("Ausgewaehltes Paar = " + P.toString() + "");
|
||||
inferencelog.debug( "--------------------------------------------------");
|
||||
|
||||
|
||||
//wenn noetig extends-wildcards entfernen PL 15-01-30
|
||||
if(P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType)
|
||||
{
|
||||
ExtendsWildcardType exT1 = (ExtendsWildcardType)P.TA1;
|
||||
ExtendsWildcardType exT2 = (ExtendsWildcardType)P.TA2;
|
||||
|
||||
H.addElement(new Pair(exT1.get_ExtendsType(), exT2.get_ExtendsType()));
|
||||
|
||||
bRegel = true;
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
//wenn noetig super-wildcards entfernen PL 15-01-30
|
||||
if(P.TA1 instanceof SuperWildcardType && P.TA2 instanceof SuperWildcardType)
|
||||
{
|
||||
SuperWildcardType suT1 = (SuperWildcardType)P.TA1;
|
||||
SuperWildcardType suT2 = (SuperWildcardType)P.TA2;
|
||||
|
||||
H.addElement(new Pair(suT1.get_SuperType(), suT2.get_SuperType()));
|
||||
|
||||
bRegel = true;
|
||||
continue;
|
||||
|
||||
}
|
||||
|
||||
// Bei allen Erase erfolgt keine Kopie nach H, dadurch wird das Pair gelöscht.
|
||||
//ERASE3
|
||||
if( P.isEqual() && P.OperatorEqual() )
|
||||
@ -1383,21 +1409,21 @@ throws MatchException
|
||||
TA1 = (RefType)P.TA1;
|
||||
TA2 = (RefType)P.TA2;
|
||||
}
|
||||
else if(P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType)
|
||||
else if(P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType) //nicht mehr noetig, wird bereits am Anfang der Schleife entfernt
|
||||
{
|
||||
ExtendsWildcardType exT1 = (ExtendsWildcardType)P.TA1;
|
||||
ExtendsWildcardType exT2 = (ExtendsWildcardType)P.TA2;
|
||||
//if(exT1.get_ExtendsType() instanceof RefType && exT2.get_ExtendsType() instanceof RefType) PL 15-01-30
|
||||
if(exT1.get_ExtendsType() instanceof RefType && exT2.get_ExtendsType() instanceof RefType)
|
||||
{
|
||||
TA1 = (RefType)exT1.get_ExtendsType();
|
||||
TA2 = (RefType)exT2.get_ExtendsType();
|
||||
}
|
||||
}
|
||||
else if(P.TA1 instanceof SuperWildcardType && P.TA2 instanceof SuperWildcardType)
|
||||
else if(P.TA1 instanceof SuperWildcardType && P.TA2 instanceof SuperWildcardType) //nicht mehr noetig, wird bereits am Anfang der Schleife entfernt
|
||||
{
|
||||
SuperWildcardType suT1 = (SuperWildcardType)P.TA1;
|
||||
SuperWildcardType suT2 = (SuperWildcardType)P.TA2;
|
||||
//if(suT1.get_SuperType() instanceof RefType && suT2.get_SuperType() instanceof RefType) PL 15-01-30
|
||||
if(suT1.get_SuperType() instanceof RefType && suT2.get_SuperType() instanceof RefType)
|
||||
{
|
||||
TA1 = (RefType)suT1.get_SuperType();
|
||||
TA2 = (RefType)suT2.get_SuperType();
|
||||
|
Loading…
Reference in New Issue
Block a user