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 75c081d7667..ab92c749b2d 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 @@ -7864,6 +7864,18 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } + @Test + @TestMetadata("kt49615.kt") + public void testKt49615() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt"); + } + + @Test + @TestMetadata("kt49615a.kt") + public void testKt49615a() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt"); + } + @Test @TestMetadata("loopInInlineFun.kt") public void testLoopInInlineFun() throws Exception { diff --git a/compiler/testData/codegen/box/constructorCall/kt49615.kt b/compiler/testData/codegen/box/constructorCall/kt49615.kt new file mode 100644 index 00000000000..e49e55c6821 --- /dev/null +++ b/compiler/testData/codegen/box/constructorCall/kt49615.kt @@ -0,0 +1,17 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME + +fun builder(c: suspend () -> Unit): Int = 42 + +@JvmInline +value class IC(val s: String) + +fun box(): String { + builder { + listOf( + IC("O".plus("").sumOf { a: Char -> 1.toULong() }.rangeTo(67.toULong()).first.toString(36)), + IC("") + ) + } + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/constructorCall/kt49615a.kt b/compiler/testData/codegen/box/constructorCall/kt49615a.kt new file mode 100644 index 00000000000..44235702cd4 --- /dev/null +++ b/compiler/testData/codegen/box/constructorCall/kt49615a.kt @@ -0,0 +1,16 @@ +// TARGET_BACKEND: JVM +// WITH_RUNTIME + +@JvmInline +value class IC(val s: String) + +fun asAny(a: Any) = a + +fun box(): String { + val t = asAny( + IC("O".plus("").sumOf { a: Char -> 1.toULong() }.rangeTo(67.toULong()).first.toString(36)) + ).toString() + if (t != "IC(s=1)") + return "Failed: t=$t" + return "OK" +} 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 23f717259ba..50bf2ba6f76 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 @@ -7786,6 +7786,18 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } + @Test + @TestMetadata("kt49615.kt") + public void testKt49615() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt"); + } + + @Test + @TestMetadata("kt49615a.kt") + public void testKt49615a() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt"); + } + @Test @TestMetadata("loopInInlineFun.kt") public void testLoopInInlineFun() 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 095ce666a8c..f31097020ae 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 @@ -7864,6 +7864,18 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } + @Test + @TestMetadata("kt49615.kt") + public void testKt49615() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt"); + } + + @Test + @TestMetadata("kt49615a.kt") + public void testKt49615a() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt"); + } + @Test @TestMetadata("loopInInlineFun.kt") public void testLoopInInlineFun() 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 2d86bc6728b..138486661bf 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -5950,6 +5950,16 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/constructorCall/inlineFunInLocalClassConstructorCall.kt"); } + @TestMetadata("kt49615.kt") + public void testKt49615() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615.kt"); + } + + @TestMetadata("kt49615a.kt") + public void testKt49615a() throws Exception { + runTest("compiler/testData/codegen/box/constructorCall/kt49615a.kt"); + } + @TestMetadata("loopInInlineFun.kt") public void testLoopInInlineFun() throws Exception { runTest("compiler/testData/codegen/box/constructorCall/loopInInlineFun.kt");