diff --git a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java index 0a7106f3..895c4ecd 100644 --- a/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java +++ b/src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java @@ -445,6 +445,9 @@ public class SyntaxTreeGenerator { MethodblockContext methodblock = (MethodblockContext) body; block = stmtgen.convert(methodblock.block(), true); } + else { + modifiers += Modifier.ABSTRACT; + } return new Method(modifiers, name, retType, paramlist, block, gtvDeclarations, bodydeclaration.getStart()); } diff --git a/src/test/java/TestComplete.java b/src/test/java/TestComplete.java index d3ca98f4..43c8883d 100644 --- a/src/test/java/TestComplete.java +++ b/src/test/java/TestComplete.java @@ -740,7 +740,7 @@ public class TestComplete { @Test public void testLambdaRunnable() throws Exception { var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LambdaRunnable.jav"); - var clazz = classFiles.get("LamRunnable"); + var clazz = classFiles.get("LambdaRunnable"); var instance = clazz.getDeclaredConstructor().newInstance(); //var m = clazz.getDeclaredMethod("m", Integer.class); //assertEquals(m.invoke(instance, 10), 60);