Migrate tests to release coroutines

where it's not essential to use experimental ones

#KT-36083

Original commit: 30bccc431b
This commit is contained in:
Ilya Gorbunov
2020-01-22 06:45:21 +03:00
parent 9a820cde31
commit 93d5015b46
2 changed files with 4 additions and 7 deletions
@@ -1 +0,0 @@
// IGNORE_BACKEND: JVM_IR
@@ -1,18 +1,16 @@
package usage
import kotlin.coroutines.experimental.*
import kotlin.coroutines.experimental.intrinsics.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
fun async(x: suspend Controller.() -> Unit) {
x.startCoroutine(Controller(), object : Continuation<Unit> {
override val context: CoroutineContext = null!!
override fun resume(value: Unit) {}
override fun resumeWithException(exception: Throwable) {}
override fun resumeWith(result: Result<Unit>) {}
})
}
class Controller {
suspend fun step(param: Int) = suspendCoroutineOrReturn<Int> { next ->
suspend fun step(param: Int) = suspendCoroutineUninterceptedOrReturn<Int> { next ->
next.resume(param + 1)
}
}