forked from JavaTX/JavaCompilerCore
modified: src/main/java/de/dhbwstuttgart/parser/SyntaxTreeGenerator/SyntaxTreeGenerator.java
modified: src/test/java/TestComplete.java
This commit is contained in:
parent
78a2fddc21
commit
6f193b19ab
@ -445,6 +445,9 @@ public class SyntaxTreeGenerator {
|
|||||||
MethodblockContext methodblock = (MethodblockContext) body;
|
MethodblockContext methodblock = (MethodblockContext) body;
|
||||||
block = stmtgen.convert(methodblock.block(), true);
|
block = stmtgen.convert(methodblock.block(), true);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
modifiers += Modifier.ABSTRACT;
|
||||||
|
}
|
||||||
return new Method(modifiers, name, retType, paramlist, block, gtvDeclarations, bodydeclaration.getStart());
|
return new Method(modifiers, name, retType, paramlist, block, gtvDeclarations, bodydeclaration.getStart());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -740,7 +740,7 @@ public class TestComplete {
|
|||||||
@Test
|
@Test
|
||||||
public void testLambdaRunnable() throws Exception {
|
public void testLambdaRunnable() throws Exception {
|
||||||
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LambdaRunnable.jav");
|
var classFiles = generateClassFiles(new ByteArrayClassLoader(), "LambdaRunnable.jav");
|
||||||
var clazz = classFiles.get("LamRunnable");
|
var clazz = classFiles.get("LambdaRunnable");
|
||||||
var instance = clazz.getDeclaredConstructor().newInstance();
|
var instance = clazz.getDeclaredConstructor().newInstance();
|
||||||
//var m = clazz.getDeclaredMethod("m", Integer.class);
|
//var m = clazz.getDeclaredMethod("m", Integer.class);
|
||||||
//assertEquals(m.invoke(instance, 10), 60);
|
//assertEquals(m.invoke(instance, 10), 60);
|
||||||
|
Loading…
Reference in New Issue
Block a user