[K/JS] Fix corutines build for 1.9.20
This reverts commit f0d6471a8bcbdfc52ddc840a6383032ef86976d1.
This commit is contained in:
-35
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user