diff --git a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/inlineclasses/MemoizedInlineClassReplacements.kt b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/inlineclasses/MemoizedInlineClassReplacements.kt index d59bdc02045..f5c4e2bdc88 100644 --- a/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/inlineclasses/MemoizedInlineClassReplacements.kt +++ b/compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/inlineclasses/MemoizedInlineClassReplacements.kt @@ -51,7 +51,7 @@ class MemoizedInlineClassReplacements { it.isSyntheticInlineClassMember || it.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA || it.origin == IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR || - it.origin == JvmLoweredDeclarationOrigin.POLYMORPHIC_SIGNATURE_INSTANTIATION -> null + it.origin.isSynthetic -> null it.hasMethodReplacement -> createMethodReplacement(it) it.hasStaticReplacement -> createStaticReplacement(it) else -> null diff --git a/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt b/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt new file mode 100644 index 00000000000..c1d7560f239 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt @@ -0,0 +1,17 @@ +// IGNORE_BACKEND_FIR: JVM_IR + +@Target(AnnotationTarget.PROPERTY) +annotation class Anno + +inline class Z(val s: String) + +class A { + @Anno + val Z.r: String get() = s +} + +fun box(): String { + with(A()) { + return Z("OK").r + } +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index 50e39d499fb..f1d7a5ae50d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -12408,6 +12408,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("annotatedMemberExtensionProperty.kt") + public void testAnnotatedMemberExtensionProperty() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt"); + } + @TestMetadata("boundCallableReferencePassedToInlineFunction.kt") public void testBoundCallableReferencePassedToInlineFunction() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index c55f75b70fc..1e6f7eb15ad 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -12423,6 +12423,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM, true); } + @TestMetadata("annotatedMemberExtensionProperty.kt") + public void testAnnotatedMemberExtensionProperty() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt"); + } + @TestMetadata("boundCallableReferencePassedToInlineFunction.kt") public void testBoundCallableReferencePassedToInlineFunction() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 4f8a327f81c..30bc5ac2d9d 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -11258,6 +11258,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); } + @TestMetadata("annotatedMemberExtensionProperty.kt") + public void testAnnotatedMemberExtensionProperty() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt"); + } + @TestMetadata("boundCallableReferencePassedToInlineFunction.kt") public void testBoundCallableReferencePassedToInlineFunction() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 5fc054492a8..5a54c2d607e 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -11258,6 +11258,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JVM_IR, true); } + @TestMetadata("annotatedMemberExtensionProperty.kt") + public void testAnnotatedMemberExtensionProperty() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt"); + } + @TestMetadata("boundCallableReferencePassedToInlineFunction.kt") public void testBoundCallableReferencePassedToInlineFunction() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index 52efe99975b..01905aeb07b 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -9743,6 +9743,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS_IR, true); } + @TestMetadata("annotatedMemberExtensionProperty.kt") + public void testAnnotatedMemberExtensionProperty() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt"); + } + @TestMetadata("boundCallableReferencePassedToInlineFunction.kt") public void testBoundCallableReferencePassedToInlineFunction() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index d963764e19f..b1a1f3387e1 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -10883,6 +10883,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/codegen/box/inlineClasses"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.JS, true); } + @TestMetadata("annotatedMemberExtensionProperty.kt") + public void testAnnotatedMemberExtensionProperty() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/annotatedMemberExtensionProperty.kt"); + } + @TestMetadata("boundCallableReferencePassedToInlineFunction.kt") public void testBoundCallableReferencePassedToInlineFunction() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt");