TPH <. ? super Ty reduziert auf TPH <. Ty eingefuegt, damit BUG 7 geloest
This commit is contained in:
parent
549640dfc4
commit
f2bc4f0ffa
@ -321,6 +321,9 @@ public class Unify
|
||||
{
|
||||
if(p.TA1 instanceof TypePlaceholder)
|
||||
{
|
||||
//TPH <. ? super Ty entspricht TPH <. Ty
|
||||
if (p.TA2 instanceof SuperWildcardType) p.TA2 = ((SuperWildcardType)p.TA2).get_SuperType();
|
||||
|
||||
if(p.OperatorEqual())
|
||||
{
|
||||
//Alle Paare die bereits durch sub_unify die richtige Struktur haben einfach durchleiten.
|
||||
@ -330,7 +333,7 @@ public class Unify
|
||||
setofsetofpairs.add(vTmp);
|
||||
cartProduktSets.add(setofsetofpairs);
|
||||
}
|
||||
else if(p.OperatorSmaller() && p.TA2 instanceof RefType)
|
||||
else if(p.OperatorSmaller() && (p.TA2 instanceof RefType))
|
||||
{
|
||||
RefType p_TA2 = (RefType)p.TA2;
|
||||
//1. Menge
|
||||
@ -446,14 +449,16 @@ public class Unify
|
||||
}
|
||||
|
||||
//aus {ty <. ty'} {? extends ty <. ty'} erzeugen //angefuegt PL 15-03-03
|
||||
Stream<Vector<Pair>> extergMenge1 =
|
||||
//DIES IST NICHT RICHTIG GETESTET, ES KOENNTE SEIN, DASS DAS KART. PRODUKT FALSCH GEBILDET WIRD.
|
||||
Stream<Vector<Pair>> strextergMenge1 =
|
||||
ergMenge1.stream().map(v ->
|
||||
v.stream().map(pa ->
|
||||
new Pair(new ExtendsWildcardType(pa.getTA1Copy().getOffset(), pa.getTA1Copy()), pa.getTA2Copy(), pa.GetOperator(), pa.bSubst)
|
||||
new Pair(pa.getTA1Copy(), new ExtendsWildcardType(pa.getTA2Copy().getOffset(), pa.getTA2Copy()), pa.GetOperator(), pa.bSubst)
|
||||
).collect(Vector::new, Vector::add, Vector::addAll));
|
||||
|
||||
Vector<Vector<Pair>> extergMenge1 = strextergMenge1.collect(Vector::new, Vector::add, Vector::addAll);
|
||||
ergMenge1.addAll(extergMenge1);
|
||||
cartProduktSets.add(ergMenge1);
|
||||
cartProduktSets.add(extergMenge1.collect(Vector::new, Vector::add, Vector::addAll));
|
||||
}
|
||||
else if(p.OperatorSmaller() && p.TA2 instanceof GenericTypeVar)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user