modified: src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java

modified:   src/test/java/TestComplete.java
This commit is contained in:
pl@gohorb.ba-horb.de 2023-11-07 00:13:43 +01:00
parent 78a2fddc21
commit 6f193b19ab
2 changed files with 4 additions and 1 deletions

View File

@ -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());
}

View File

@ -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);