Minor, add reflection test on inherited Java property
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
public class J {
|
||||||
|
public String result = null;
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
class K : J()
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val k = K()
|
||||||
|
val p = K::result
|
||||||
|
if (p.get(k) != null) return "Fail"
|
||||||
|
p.set(k, "OK")
|
||||||
|
return p.get(k)
|
||||||
|
}
|
||||||
+6
@@ -174,6 +174,12 @@ public class BlackBoxWithJavaCodegenTestGenerated extends AbstractBlackBoxCodege
|
|||||||
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true);
|
JetTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/boxWithJava/reflection"), Pattern.compile("^([^\\.]+)$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("javaPropertyInheritedInKotlin")
|
||||||
|
public void testJavaPropertyInheritedInKotlin() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/javaPropertyInheritedInKotlin/");
|
||||||
|
doTestWithJava(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("kotlinPropertyInheritedInJava")
|
@TestMetadata("kotlinPropertyInheritedInJava")
|
||||||
public void testKotlinPropertyInheritedInJava() throws Exception {
|
public void testKotlinPropertyInheritedInJava() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava/");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/boxWithJava/reflection/kotlinPropertyInheritedInJava/");
|
||||||
|
|||||||
Reference in New Issue
Block a user