diff --git a/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt b/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt index 07d3ea72405..cb7227e8ebc 100644 --- a/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt +++ b/compiler/testData/codegen/box/coroutines/inlineClasses/genericParameterResult.kt @@ -1,8 +1,10 @@ // WITH_RUNTIME -// IGNORE_BACKEND: JS_IR import kotlin.coroutines.* +var stdout = "" +fun println(s: Any?) { s?.let { stdout += it } } + fun box(): String { suspend { listOf(Result.success(true)).forEach { @@ -11,5 +13,8 @@ fun box(): String { }.startCoroutine(Continuation(EmptyCoroutineContext) { it.getOrThrow() }) + + if (stdout != "true") return "FAIL: forEach lambda inside a coroutine wasn't called" + return "OK" } \ No newline at end of file