Merge branch 'master' of ssh://gohorb.ba-horb.de/bahome/projekt/git/JavaCompilerCore

This commit is contained in:
Martin Plümicke 2015-02-03 12:26:03 +01:00
commit b4c0b17cf4
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.end
// ino.method.Class.23047.definition // ino.method.Class.23047.definition
public Class(String name, Modifiers mod, ClassBody cb, Vector<Type> ct, 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.end
// ino.method.Class.23047.body // ino.method.Class.23047.body
{ {
@ -246,7 +246,11 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit
this.superClass = superclass; this.superClass = superclass;
} }
if (vector != null) setSuperInterfaces(vector); 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); //this.set_ParaList(paralist);
Vector<GenericTypeVar> gtvList = new Vector<>(); Vector<GenericTypeVar> gtvList = new Vector<>();
int lastItemOffset = 0; int lastItemOffset = 0;
@ -256,6 +260,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit
lastItemOffset = paraT.getOffset() + paraT.get_Name().length(); lastItemOffset = paraT.getOffset() + paraT.get_Name().length();
} }
this.genericClassParameters = new GenericDeclarationList(gtvList, lastItemOffset); this.genericClassParameters = new GenericDeclarationList(gtvList, lastItemOffset);
*/
} }
if(usedIdsToCheck!=null) this.usedIdsToCheck=usedIdsToCheck; if(usedIdsToCheck!=null) this.usedIdsToCheck=usedIdsToCheck;

View File

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