Init enum entries whenever we access companion object or accessing valueOf

Fixes https://youtrack.jetbrains.com/issue/KT-43987
Fixes https://youtrack.jetbrains.com/issue/KT-43989
This commit is contained in:
Shagen Ogandzhanian
2020-12-30 14:52:21 +01:00
parent 7fa04afda2
commit e7dc199ad7
14 changed files with 284 additions and 18 deletions
@@ -11182,6 +11182,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/enum/inclassobj.kt");
}
@TestMetadata("initEntriesInCompanionObject.kt")
public void testInitEntriesInCompanionObject() throws Exception {
runTest("compiler/testData/codegen/box/enum/initEntriesInCompanionObject.kt");
}
@TestMetadata("initEntriesInValueOf.kt")
public void testInitEntriesInValueOf() throws Exception {
runTest("compiler/testData/codegen/box/enum/initEntriesInValueOf.kt");
}
@TestMetadata("initEnumAfterObjectAccess.kt")
public void testInitEnumAfterObjectAccess() throws Exception {
runTest("compiler/testData/codegen/box/enum/initEnumAfterObjectAccess.kt");
}
@TestMetadata("inner.kt")
public void testInner() throws Exception {
runTest("compiler/testData/codegen/box/enum/inner.kt");