diff --git a/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt b/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt new file mode 100644 index 00000000000..234a30603b5 --- /dev/null +++ b/compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt @@ -0,0 +1,29 @@ +// WITH_COROUTINES +// FILE: a.kt + +package a + +var result = "" + +inline class P(val value: String) + +suspend fun foo(p: P = P("OK")) { + result = p.value +} + +// FILE: b.kt + +import kotlin.coroutines.* +import helpers.* +import a.* + +fun builder(c: suspend () -> Unit) { + c.startCoroutine(EmptyContinuation) +} + +fun box(): String { + builder { + foo() + } + return result +} diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java index 9f9044306f1..e68fbbc0d8a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/CompileKotlinAgainstKotlinTestGenerated.java @@ -363,6 +363,11 @@ public class CompileKotlinAgainstKotlinTestGenerated extends AbstractCompileKotl runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); } + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java index 91d7c44bfdf..a341496ae03 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrCompileKotlinAgainstKotlinTestGenerated.java @@ -358,6 +358,11 @@ public class IrCompileKotlinAgainstKotlinTestGenerated extends AbstractIrCompile runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); } + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java index 796c9aff032..0784cebbb36 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmIrAgainstOldBoxTestGenerated.java @@ -358,6 +358,11 @@ public class JvmIrAgainstOldBoxTestGenerated extends AbstractJvmIrAgainstOldBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); } + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java index 36f3d5d4dae..0b6f74b0385 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/JvmOldAgainstIrBoxTestGenerated.java @@ -358,6 +358,11 @@ public class JvmOldAgainstIrBoxTestGenerated extends AbstractJvmOldAgainstIrBoxT runTest("compiler/testData/compileKotlinAgainstKotlin/starImportEnum.kt"); } + @TestMetadata("suspendFunWithDefaultMangling.kt") + public void testSuspendFunWithDefaultMangling() throws Exception { + runTest("compiler/testData/compileKotlinAgainstKotlin/suspendFunWithDefaultMangling.kt"); + } + @TestMetadata("targetedJvmName.kt") public void testTargetedJvmName() throws Exception { runTest("compiler/testData/compileKotlinAgainstKotlin/targetedJvmName.kt");