Test: add jvm backend test for named class object
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
class C() {
|
||||||
|
class object Foo
|
||||||
|
}
|
||||||
|
|
||||||
|
fun C.Foo.create() = 3
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val c1 = C.Foo.create()
|
||||||
|
val c2 = C.create()
|
||||||
|
return if (c1 == 3 && c2 == 3) "OK" else "fail"
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
class C() {
|
||||||
|
class object Foo {
|
||||||
|
fun create() = 3
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
val c1 = C.Foo.create()
|
||||||
|
val c2 = C.create()
|
||||||
|
return if (c1 == 3 && c2 == 3) "OK" else "fail"
|
||||||
|
}
|
||||||
|
|
||||||
+12
@@ -1004,6 +1004,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("extensionOnNamedClassObject.kt")
|
||||||
|
public void testExtensionOnNamedClassObject() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/extensionOnNamedClassObject.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("funDelegation.kt")
|
@TestMetadata("funDelegation.kt")
|
||||||
public void testFunDelegation() throws Exception {
|
public void testFunDelegation() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/funDelegation.kt");
|
||||||
@@ -1388,6 +1394,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
doTest(fileName);
|
doTest(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("namedClassObject.kt")
|
||||||
|
public void testNamedClassObject() throws Exception {
|
||||||
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/namedClassObject.kt");
|
||||||
|
doTest(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("outerThis.kt")
|
@TestMetadata("outerThis.kt")
|
||||||
public void testOuterThis() throws Exception {
|
public void testOuterThis() throws Exception {
|
||||||
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt");
|
String fileName = JetTestUtils.navigationMetadata("compiler/testData/codegen/box/classes/outerThis.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user