[K/N] Extract const val initializers to place of usage

This would make behaviour more consistent with jvm. There is still
a difference in behaviour about point where side effects happen.

^KT-52970
This commit is contained in:
Pavel Kunyavskiy
2022-07-11 16:39:13 +02:00
committed by Space
parent 6a8da8f9eb
commit 5cdda48487
15 changed files with 212 additions and 43 deletions
@@ -29340,6 +29340,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/properties/const/interfaceCompanion.kt");
}
@TestMetadata("intermoduleInlineConst.kt")
public void testIntermoduleInlineConst() throws Exception {
runTest("compiler/testData/codegen/box/properties/const/intermoduleInlineConst.kt");
}
@TestMetadata("kt52970.kt")
public void testKt52970() throws Exception {
runTest("compiler/testData/codegen/box/properties/const/kt52970.kt");
}
@TestMetadata("nonConstValsAreProperlyInitialized.kt")
public void testNonConstValsAreProperlyInitialized() throws Exception {
runTest("compiler/testData/codegen/box/properties/const/nonConstValsAreProperlyInitialized.kt");