diff --git a/src/test/java/targetast/TestComplete.java b/src/test/java/targetast/TestComplete.java index 83ea8ec4..c2b41371 100644 --- a/src/test/java/targetast/TestComplete.java +++ b/src/test/java/targetast/TestComplete.java @@ -464,4 +464,10 @@ public class TestComplete { var classFiles = generateClassFiles("Y.jav", new ByteArrayClassLoader()); var instance = classFiles.get("Y").getDeclaredConstructor().newInstance(); } + + @Test + public void boxTest() throws Exception { + var classFiles = generateClassFiles("Box.jav", new ByteArrayClassLoader()); + var instance = classFiles.get("Box_Main").getDeclaredConstructor().newInstance(); + } } diff --git a/src/test/resources/bytecode/javFiles/Box.jav b/src/test/resources/bytecode/javFiles/Box.jav new file mode 100644 index 00000000..e83bde6d --- /dev/null +++ b/src/test/resources/bytecode/javFiles/Box.jav @@ -0,0 +1,11 @@ +class Box { + void m(A a) { } +} + +class B { } +class Box_Main extends B { + m(b) { + b.m(new Box_Main()); + b.m(new B()); + } +}