diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index e7801da77da..483e39195d3 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -16960,6 +16960,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @Test + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @Test @TestMetadata("constructorImplVisibility.kt") public void testConstructorImplVisibility() throws Exception { 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 629179bf7c9..5f85b89f619 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 @@ -59,7 +59,8 @@ class MemoizedInlineClassReplacements( it.origin == IrDeclarationOrigin.LOCAL_FUNCTION_FOR_LAMBDA || (it.origin == IrDeclarationOrigin.DELEGATED_PROPERTY_ACCESSOR && it.visibility == DescriptorVisibilities.LOCAL) || it.isStaticInlineClassReplacement || - it.origin.isSynthetic -> + it.origin.isSynthetic || + it.origin == IrDeclarationOrigin.ADAPTER_FOR_CALLABLE_REFERENCE -> null it.isInlineClassFieldGetter -> diff --git a/compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt b/compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt new file mode 100644 index 00000000000..816ed49a63b --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt @@ -0,0 +1,14 @@ +// WITH_RUNTIME +// KJS_FULL_RUNTIME + +interface I { + companion object { + val default: IC by lazy(::IC) + } +} + +inline class IC(val ok: String = "OK") : I + +fun box(): String { + return I.default.ok +} \ No newline at end of file diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index e9208134610..881b0294160 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -16960,6 +16960,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @Test + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @Test @TestMetadata("constructorImplVisibility.kt") public void testConstructorImplVisibility() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index d0cbbdb125c..fe98e42f7e8 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -16960,6 +16960,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @Test + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @Test @TestMetadata("constructorImplVisibility.kt") public void testConstructorImplVisibility() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index acb06b859ba..e970f3d16d1 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -14134,6 +14134,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @TestMetadata("constructorImplVisibility.kt") public void testConstructorImplVisibility() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/constructorImplVisibility.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 36e343d0123..576fd3cbf45 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -12389,6 +12389,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @TestMetadata("correctBoxingForBranchExpressions.kt") public void testCorrectBoxingForBranchExpressions() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index a90c4995b66..b57b4501bcc 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -11874,6 +11874,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @TestMetadata("correctBoxingForBranchExpressions.kt") public void testCorrectBoxingForBranchExpressions() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index 1c1d05da831..42e581345c0 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -11939,6 +11939,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @TestMetadata("correctBoxingForBranchExpressions.kt") public void testCorrectBoxingForBranchExpressions() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index f1673cf96e0..d0369ce3b16 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -6370,6 +6370,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/conformToComparableAndCallInterfaceMethod.kt"); } + @TestMetadata("constructorCallableReference.kt") + public void testConstructorCallableReference() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/constructorCallableReference.kt"); + } + @TestMetadata("correctBoxingForBranchExpressions.kt") public void testCorrectBoxingForBranchExpressions() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/correctBoxingForBranchExpressions.kt");