[K/JS] Fix corutines build for 1.9.20

This reverts commit f0d6471a8bcbdfc52ddc840a6383032ef86976d1.
This commit is contained in:
Artem Kobzar
2023-08-31 14:24:45 +02:00
parent 1a36a06a07
commit 857c07fa25
7 changed files with 6 additions and 77 deletions
@@ -1,35 +0,0 @@
// WITH_STDLIB
// EXPECTED_REACHABLE_NODES: 1292
// KT-60785
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
value class SomeValue(val a: String) {
override fun toString() = when (a) {
"fa" -> "O"
"il" -> "K"
else -> ""
}
}
suspend fun foo() = mapOf(SomeValue("fa") to SomeValue("il"))
fun builder(c: suspend () -> Unit) {
c.startCoroutine(object : Continuation<Unit> {
override val context = EmptyCoroutineContext
override fun resumeWith(result: Result<Unit>) {}
})
}
fun box(): String {
var result = ""
builder {
for ((k, v) in foo()) {
result += "$k$v"
}
}
return result
}