JS: make call to suspend lambda to resume it immediately. See KT-15379

This commit is contained in:
Alexey Andreev
2016-12-22 16:26:01 +03:00
parent 79ba6a57d6
commit 1af01d0ecb
9 changed files with 41 additions and 31 deletions
@@ -1,6 +1,5 @@
// WITH_RUNTIME
// WITH_COROUTINES
// IGNORE_BACKEND: JS
import kotlin.coroutines.*
suspend fun suspendHere(v: String): String = CoroutineIntrinsics.suspendCoroutineOrReturn { x ->
@@ -25,7 +24,7 @@ fun box(): String {
}
}
if (result != "1.0#56#55#abc") return "fail: $result"
if (result != "1.0#56#55#abc" && result != "1#56#55#abc") return "fail: $result"
return final
}
@@ -1,6 +1,5 @@
// WITH_RUNTIME
// WITH_COROUTINES
// IGNORE_BACKEND: JS
import kotlin.coroutines.*
suspend fun suspendHere(v: String): String = CoroutineIntrinsics.suspendCoroutineOrReturn { x ->