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 763e5039d62..dc203bc912c 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 @@ -9728,6 +9728,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @Test + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @Test @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { diff --git a/compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt b/compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt new file mode 100644 index 00000000000..f16412c1b76 --- /dev/null +++ b/compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt @@ -0,0 +1,26 @@ +// WITH_RUNTIME + +import kotlin.coroutines.* + +suspend fun foo() { + Foo( + arrayOf( + bar() + ) + ) +} + +suspend fun bar() = 5 +var failure = false + +class Foo(blobParts: Array) { + init { + if (blobParts[0] != 5) failure = true + } +} + +fun box(): String { + ::foo.startCoroutine(Continuation(EmptyCoroutineContext) { it.getOrThrow() }) + + return if (!failure) "OK" else "FAILURE" +} 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 fa3b995009f..fb2f93c0d38 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 @@ -9626,6 +9626,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @Test + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @Test @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() 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 7f20d796240..ceea37ec3dc 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 @@ -9728,6 +9728,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @Test + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @Test @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() 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 e445345d5af..0cf246bf735 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -7535,6 +7535,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.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 2449f640663..44dbe5eb798 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 @@ -6699,6 +6699,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.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 907c60e0b4f..6e113310a03 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 @@ -6105,6 +6105,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.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 53e091ca227..791942a6116 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 @@ -6105,6 +6105,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/coroutines/suspendCallsInArguments.kt"); } + @TestMetadata("suspendConstructorCallArrayOf.kt") + public void testSuspendConstructorCallArrayOf() throws Exception { + runTest("compiler/testData/codegen/box/coroutines/suspendConstructorCallArrayOf.kt"); + } + @TestMetadata("suspendCoroutineFromStateMachine.kt") public void testSuspendCoroutineFromStateMachine() throws Exception { runTest("compiler/testData/codegen/box/coroutines/suspendCoroutineFromStateMachine.kt");