Falsche Übernahme von BoGTV im Konstruktor von Class beheben

This commit is contained in:
JanUlrich 2015-02-03 12:24:40 +01:00
parent de4cfa2656
commit 8aa106b38a
2 changed files with 9 additions and 4 deletions

View File

@ -234,7 +234,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit
// ino.end
// ino.method.Class.23047.definition
public Class(String name, Modifiers mod, ClassBody cb, Vector<Type> ct,
Type superclass, Vector<Type> vector, Vector<Type> paralist, int offset)
Type superclass, Vector<Type> vector, Vector<? extends Type> paralist, int offset)
// ino.end
// ino.method.Class.23047.body
{
@ -246,7 +246,11 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit
this.superClass = superclass;
}
if (vector != null) setSuperInterfaces(vector);
if (paralist != null){
if (paralist != null && !paralist.isEmpty()){
Type lastPara = paralist.lastElement();
Integer lastItemOffset = lastPara.getOffset() + lastPara.get_Name().length();
this.setGenericParameter(new GenericDeclarationList((Vector<GenericTypeVar>)paralist, lastItemOffset));
/*
//this.set_ParaList(paralist);
Vector<GenericTypeVar> gtvList = new Vector<>();
int lastItemOffset = 0;
@ -256,6 +260,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit
lastItemOffset = paraT.getOffset() + paraT.get_Name().length();
}
this.genericClassParameters = new GenericDeclarationList(gtvList, lastItemOffset);
*/
}
if(usedIdsToCheck!=null) this.usedIdsToCheck=usedIdsToCheck;

View File

@ -1,5 +1,5 @@
class GenericTest{
<A extends Integer> A method(){
class GenericTest<A extends Integer>{
A method(){
A x;
Integer integer;
x = integer;