alle Faelle P.OperatorSmallerExtends eingefuegt
This commit is contained in:
parent
acd20842e2
commit
4e61ba736d
@ -1519,14 +1519,25 @@ throws MatchException
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (P.OperatorSmallerExtends()) //PL 15-02-03 Es muessen noch alle Fälle betrachtet werden.
|
if (P.OperatorSmallerExtends()) //PL 15-02-17 alle eingefuegt
|
||||||
{
|
{
|
||||||
if(P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType)
|
if(P.TA1 instanceof ExtendsWildcardType && P.TA2 instanceof ExtendsWildcardType)
|
||||||
{
|
{
|
||||||
|
|
||||||
inferencelog.debug(" Extends <? Extends");
|
inferencelog.debug(" Extends <? Extends");
|
||||||
|
|
||||||
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),((WildcardType)P.TA2).GetWildcardType(), PairOperator.Equal));
|
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),((WildcardType)P.TA2).GetWildcardType(), PairOperator.Smaller));
|
||||||
|
bRegel = true;
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(P.TA1 instanceof WildcardType) && P.TA2 instanceof ExtendsWildcardType)
|
||||||
|
{
|
||||||
|
|
||||||
|
inferencelog.debug(" TA1 <? Extends");
|
||||||
|
|
||||||
|
H.add(new Pair(P.TA1,((WildcardType)P.TA2).GetWildcardType(), PairOperator.Smaller));
|
||||||
bRegel = true;
|
bRegel = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1537,7 +1548,18 @@ throws MatchException
|
|||||||
|
|
||||||
inferencelog.debug(" Super <? Super");
|
inferencelog.debug(" Super <? Super");
|
||||||
|
|
||||||
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),((WildcardType)P.TA2).GetWildcardType(), PairOperator.Equal));
|
H.add(new Pair(((WildcardType)P.TA2).GetWildcardType(),((WildcardType)P.TA1).GetWildcardType(), PairOperator.Smaller));
|
||||||
|
bRegel = true;
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!(P.TA1 instanceof WildcardType) && P.TA2 instanceof SuperWildcardType)
|
||||||
|
{
|
||||||
|
|
||||||
|
inferencelog.debug(" TA1 <? Super");
|
||||||
|
|
||||||
|
H.add(new Pair(((WildcardType)P.TA2).GetWildcardType(), P.TA1, PairOperator.Smaller));
|
||||||
bRegel = true;
|
bRegel = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -1548,29 +1570,31 @@ throws MatchException
|
|||||||
|
|
||||||
inferencelog.debug(" Extends <? Super");
|
inferencelog.debug(" Extends <? Super");
|
||||||
|
|
||||||
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),((WildcardType)P.TA2).GetWildcardType(), PairOperator.Smaller));
|
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),((WildcardType)P.TA2).GetWildcardType(), PairOperator.Equal));
|
||||||
bRegel = true;
|
bRegel = true;
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//PL 15-02-08
|
if(P.TA1 instanceof SuperWildcardType && P.TA2 instanceof ExtendsWildcardType)
|
||||||
if(P.TA1 instanceof WildcardType && ((WildcardType)P.TA1).GetWildcardType() instanceof TypePlaceholder
|
{
|
||||||
&& (P.TA2 instanceof GenericTypeVar || P.TA2 instanceof RefType))
|
|
||||||
|
inferencelog.debug(" Super <? Extends");
|
||||||
|
|
||||||
|
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),((WildcardType)P.TA2).GetWildcardType(), PairOperator.Equal));
|
||||||
|
bRegel = true;
|
||||||
|
continue;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//PL 15-02-08 angepasst 15-02-17
|
||||||
|
if(P.TA1 instanceof WildcardType && !(P.TA2 instanceof WildcardType))
|
||||||
{
|
{
|
||||||
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),P.TA2, PairOperator.Equal));
|
H.add(new Pair(((WildcardType)P.TA1).GetWildcardType(),P.TA2, PairOperator.Equal));
|
||||||
bRegel = true;
|
bRegel = true;
|
||||||
continue;
|
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<EFBFBD>fen
|
// Subst --> noch zu pr<EFBFBD>fen
|
||||||
|
Loading…
Reference in New Issue
Block a user