FIR2IR: don't generate IR getter for const library properties
This commit is contained in:
+6
@@ -13706,6 +13706,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
|||||||
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("IrBuiltIns.kt")
|
||||||
|
public void testIrBuiltIns() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("SuspendExtension.kt")
|
@TestMetadata("SuspendExtension.kt")
|
||||||
public void testSuspendExtension() throws Exception {
|
public void testSuspendExtension() throws Exception {
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ class Fir2IrLazyProperty(
|
|||||||
}
|
}
|
||||||
|
|
||||||
override var getter: IrSimpleFunction? by lazyVar {
|
override var getter: IrSimpleFunction? by lazyVar {
|
||||||
|
if (fir.isConst) return@lazyVar null
|
||||||
Fir2IrLazyPropertyAccessor(
|
Fir2IrLazyPropertyAccessor(
|
||||||
components, startOffset, endOffset,
|
components, startOffset, endOffset,
|
||||||
when {
|
when {
|
||||||
|
|||||||
+18
@@ -0,0 +1,18 @@
|
|||||||
|
// TARGET_BACKEND: JVM
|
||||||
|
// MODULE: lib
|
||||||
|
// FILE: A.kt
|
||||||
|
|
||||||
|
class IrBuiltIns {
|
||||||
|
object OperatorNames {
|
||||||
|
const val LESS = "OK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// MODULE: main(lib)
|
||||||
|
// FILE: B.kt
|
||||||
|
|
||||||
|
fun foo(s: String) = s
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
return foo(IrBuiltIns.OperatorNames.LESS)
|
||||||
|
}
|
||||||
+6
@@ -13706,6 +13706,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("IrBuiltIns.kt")
|
||||||
|
public void testIrBuiltIns() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("SuspendExtension.kt")
|
@TestMetadata("SuspendExtension.kt")
|
||||||
public void testSuspendExtension() throws Exception {
|
public void testSuspendExtension() throws Exception {
|
||||||
|
|||||||
+6
@@ -13706,6 +13706,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("IrBuiltIns.kt")
|
||||||
|
public void testIrBuiltIns() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@TestMetadata("SuspendExtension.kt")
|
@TestMetadata("SuspendExtension.kt")
|
||||||
public void testSuspendExtension() throws Exception {
|
public void testSuspendExtension() throws Exception {
|
||||||
|
|||||||
+5
@@ -12046,6 +12046,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
public void testExtensionAlias() throws Exception {
|
public void testExtensionAlias() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
runTest("compiler/testData/codegen/box/fir/ExtensionAlias.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("IrBuiltIns.kt")
|
||||||
|
public void testIrBuiltIns() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/fir/IrBuiltIns.kt");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/codegen/box/fullJdk")
|
@TestMetadata("compiler/testData/codegen/box/fullJdk")
|
||||||
|
|||||||
Reference in New Issue
Block a user