diff --git a/src/de/dhbwstuttgart/syntaxtree/Class.java b/src/de/dhbwstuttgart/syntaxtree/Class.java index 7c620b65..8e05b2d3 100755 --- a/src/de/dhbwstuttgart/syntaxtree/Class.java +++ b/src/de/dhbwstuttgart/syntaxtree/Class.java @@ -179,7 +179,7 @@ public class Class extends SyntaxTreeNode implements AClassOrInterface, IItemWit GenericTypeVar newGTV=new GenericTypeVar(gname,this,0); gtvs.add(newGTV); } - this.genericClassParameters = new GenericDeclarationList(gtvs,0); + this.setGenericParameter(new GenericDeclarationList(gtvs,0)); } public Class(String name, RefType superClass, Modifiers mod, int offset){ diff --git a/test/plugindevelopment/TypeInsertTests/ImportTest.jav b/test/plugindevelopment/TypeInsertTests/ImportTest.jav index cf9cf8ba..7e761863 100644 --- a/test/plugindevelopment/TypeInsertTests/ImportTest.jav +++ b/test/plugindevelopment/TypeInsertTests/ImportTest.jav @@ -2,8 +2,8 @@ import java.util.Vector; class ImportTest{ Vector var; -var2; -methode(){ + +methode(var2){ var.add(var2); } diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest4.jav b/test/plugindevelopment/TypeInsertTests/LambdaTest4.jav index 34c32b1d..93ad27b5 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest4.jav +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest4.jav @@ -1,5 +1,9 @@ class LambdaTest{ -Fun1 op = (var) -> {return var;}; +Fun1 op = (var) -> { + var2; + var2 = var; + return var; + }; } \ No newline at end of file diff --git a/test/plugindevelopment/TypeInsertTests/LambdaTest4.java b/test/plugindevelopment/TypeInsertTests/LambdaTest4.java index 047d4c92..a2cabe22 100644 --- a/test/plugindevelopment/TypeInsertTests/LambdaTest4.java +++ b/test/plugindevelopment/TypeInsertTests/LambdaTest4.java @@ -11,7 +11,7 @@ public class LambdaTest4 { @Test public void run(){ Vector mustContain = new Vector(); - //mustContain.add("String var"); + mustContain.add("String var2;"); MultipleTypesInsertTester.test(this.TEST_FILE, mustContain); } diff --git a/test/plugindevelopment/TypeInsertTests/OverloadingInMethod2.jav b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod2.jav index e3ef8328..4dc93178 100644 --- a/test/plugindevelopment/TypeInsertTests/OverloadingInMethod2.jav +++ b/test/plugindevelopment/TypeInsertTests/OverloadingInMethod2.jav @@ -1,8 +1,8 @@ class OverloadingInMethod2{ - Fun1>, ? super C> m () { - Fun1>, ? super C> op; + Fun1>, ? super C> m () { + Fun1>, ? super C> op; op = (m) -> (f) -> f.apply(m); return op; }