[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
@@ -28056,6 +28056,18 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
public void testConstPropertyAccessor() throws Exception {
runTest("compiler/testData/codegen/box/properties/const/constPropertyAccessor.kt");
}
@Test
@TestMetadata("intermoduleInlineConst.kt")
public void testIntermoduleInlineConst() throws Exception {
runTest("compiler/testData/codegen/box/properties/const/intermoduleInlineConst.kt");
}
@Test
@TestMetadata("kt52970.kt")
public void testKt52970() throws Exception {
runTest("compiler/testData/codegen/box/properties/const/kt52970.kt");
}
}
@Nested