Add Box test

This commit is contained in:
Victorious3 2022-09-22 16:50:19 +02:00
parent 5503f3723c
commit 04b9af8c7b
2 changed files with 17 additions and 0 deletions

View File

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

View File

@ -0,0 +1,11 @@
class Box<A> {
void m(A a) { }
}
class B { }
class Box_Main extends B {
m(b) {
b.m(new Box_Main());
b.m(new B());
}
}