Use captured instance in interface companion object initializer
Similar to enum entry initialization, when we have a companion object in an interface, its constructor (or clinit) initializes its state before the instance field in corresponding interface is initialized. So, interface companion object must be accessed via a captured object reference (#0, or #0.this$0 for inner anonymous objects).
This commit is contained in:
@@ -11846,6 +11846,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("interfaceCompanionObjectReference.kt")
|
||||
public void testInterfaceCompanionObjectReference() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/interfaceCompanionObjectReference.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("kt1047.kt")
|
||||
public void testKt1047() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/objects/kt1047.kt");
|
||||
|
||||
Reference in New Issue
Block a user