In Unify.greater1 alle Bounds einer BGTV als groesserer Typ hinzugefuegt

This commit is contained in:
Martin Plümicke 2015-02-03 12:25:45 +01:00
parent de4cfa2656
commit 56f69727eb
2 changed files with 7 additions and 1 deletions

View File

@ -3014,6 +3014,12 @@ tempKlasse.get_Superclass_Name() ); System.out.println( "P. S.:
}
}
}
else if(T instanceof BoundedGenericTypeVar) //PL 15-02-03 angefuegt da BGTV Kleiner als alle seine Bounds ist
{
BoundedGenericTypeVar bgtv = (BoundedGenericTypeVar)T;
Vector<Type> types = bgtv.getBounds();
retVec = types.stream().map(ty -> greater(ty, fc_tto)).reduce(new Vector<Type>(), (a,b) -> { a.addAll(b); return a;});
}
return retVec;
}

View File

@ -2,7 +2,7 @@ class GenericTest{
<A extends Integer> A method(){
A x;
Integer integer;
x = integer;
integer = x;
return x;
}
}