forked from JavaTX/JavaCompilerCore
Unify.subunify Kommentare eingefuegt
This commit is contained in:
parent
1b1a690212
commit
69bd1510ec
@ -1179,32 +1179,6 @@ throws MatchException
|
||||
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() )
|
||||
@ -1401,6 +1375,33 @@ throws MatchException
|
||||
//BEACHTEN: WAS PASSIERT WENN HINTER ? extends/super EINE TYPVAR/KEIN REFTYPE STEHT
|
||||
if(P.OperatorEqual())
|
||||
{
|
||||
//wenn noetig extends-wildcards entfernen PL 15-01-30
|
||||
//korrekt da P.OperatorEqual()
|
||||
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
|
||||
//korrekt da P.OperatorEqual()
|
||||
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;
|
||||
|
||||
}
|
||||
RefType TA1 = null;
|
||||
RefType TA2 = null;
|
||||
//Hier werden die RefTypes gefüllt.
|
||||
@ -1409,6 +1410,8 @@ throws MatchException
|
||||
TA1 = (RefType)P.TA1;
|
||||
TA2 = (RefType)P.TA2;
|
||||
}
|
||||
/* auskommentiert 15-01-30, da dies nict nur für RefTypes sonder für alle Typen gilt, am Anfang eingefügt.
|
||||
//FALSCH
|
||||
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;
|
||||
@ -1429,7 +1432,7 @@ throws MatchException
|
||||
TA2 = (RefType)suT2.get_SuperType();
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
if(TA1 != null && TA2 != null && TA1.getTypeName().equals(TA2.getTypeName()))
|
||||
{
|
||||
inferencelog.debug(" REDUCE2");
|
||||
|
Loading…
Reference in New Issue
Block a user