IR: fix mangling of toplevel properties
This commit is contained in:
committed by
TeamCityServer
parent
54957ead5c
commit
fb801bdc33
+6
@@ -4103,6 +4103,12 @@ public class FirBlackBoxInlineCodegenTestGenerated extends AbstractFirBlackBoxIn
|
||||
public void testFlexibleType() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indices.kt")
|
||||
public void testIndices() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+3
-1
@@ -232,7 +232,9 @@ abstract class IrMangleComputer(protected val builder: StringBuilder, private va
|
||||
declaration.parent.acceptVoid(this)
|
||||
|
||||
val isStaticProperty = if (accessor != null)
|
||||
accessor.let { it.dispatchReceiverParameter == null && declaration.parent !is IrPackageFragment }
|
||||
accessor.let {
|
||||
it.dispatchReceiverParameter == null && declaration.parent !is IrPackageFragment && !declaration.parent.isFacadeClass
|
||||
}
|
||||
else {
|
||||
// Fake override for a Java field
|
||||
val backingField = declaration.resolveFakeOverride()?.backingField
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
// FILE: 1.kt
|
||||
inline fun inlineCallingIndices(): String {
|
||||
val i1 = arrayOf("one", "two").indices
|
||||
return "OK"
|
||||
}
|
||||
|
||||
// FILE: 2.kt
|
||||
fun box() = inlineCallingIndices()
|
||||
+6
@@ -4103,6 +4103,12 @@ public class IrBlackBoxInlineCodegenTestGenerated extends AbstractIrBlackBoxInli
|
||||
public void testFlexibleType() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indices.kt")
|
||||
public void testIndices() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -4103,6 +4103,12 @@ public class IrCompileKotlinAgainstInlineKotlinTestGenerated extends AbstractIrC
|
||||
public void testFlexibleType() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indices.kt")
|
||||
public void testIndices() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -4103,6 +4103,12 @@ public class IrSerializeCompileKotlinAgainstInlineKotlinTestGenerated extends Ab
|
||||
public void testFlexibleType() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indices.kt")
|
||||
public void testIndices() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
+6
@@ -4103,6 +4103,12 @@ public class JvmIrAgainstOldBoxInlineTestGenerated extends AbstractJvmIrAgainstO
|
||||
public void testFlexibleType() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/flexibleType.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("indices.kt")
|
||||
public void testIndices() throws Exception {
|
||||
runTest("compiler/testData/codegen/boxInline/signatureMangling/indices.kt");
|
||||
}
|
||||
}
|
||||
|
||||
@Nested
|
||||
|
||||
Reference in New Issue
Block a user