Fix initialization of inner class instances in enum entries
In an inner class of the enum entry class, enum entry reference should be generated as an outer 'this', not as a enum entry access, because enum entry itself may be not initialized yet.
This commit is contained in:
@@ -7811,6 +7811,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerClassInEnumEntryClass.kt")
|
||||
public void testInnerClassInEnumEntryClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerWithExistingClassObject.kt")
|
||||
public void testInnerWithExistingClassObject() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt");
|
||||
|
||||
@@ -7811,6 +7811,12 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerClassInEnumEntryClass.kt")
|
||||
public void testInnerClassInEnumEntryClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerClassInEnumEntryClass.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("innerWithExistingClassObject.kt")
|
||||
public void testInnerWithExistingClassObject() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/codegen/box/enum/innerWithExistingClassObject.kt");
|
||||
|
||||
Reference in New Issue
Block a user