Migrate tests to release coroutines
where it's not essential to use experimental ones #KT-36083
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
package test
|
package test
|
||||||
import kotlin.coroutines.experimental.*
|
import kotlin.coroutines.*
|
||||||
|
|
||||||
data class Modifiers(val x: Int) {
|
data class Modifiers(val x: Int) {
|
||||||
external fun extFun()
|
external fun extFun()
|
||||||
|
|||||||
@@ -139,10 +139,8 @@ PsiJetFileStubImpl[package=test]
|
|||||||
USER_TYPE
|
USER_TYPE
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
USER_TYPE
|
USER_TYPE
|
||||||
USER_TYPE
|
REFERENCE_EXPRESSION[referencedName=kotlin]
|
||||||
REFERENCE_EXPRESSION[referencedName=kotlin]
|
REFERENCE_EXPRESSION[referencedName=coroutines]
|
||||||
REFERENCE_EXPRESSION[referencedName=coroutines]
|
|
||||||
REFERENCE_EXPRESSION[referencedName=experimental]
|
|
||||||
REFERENCE_EXPRESSION[referencedName=Continuation]
|
REFERENCE_EXPRESSION[referencedName=Continuation]
|
||||||
TYPE_ARGUMENT_LIST
|
TYPE_ARGUMENT_LIST
|
||||||
TYPE_PROJECTION[projectionKind=NONE]
|
TYPE_PROJECTION[projectionKind=NONE]
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
// IGNORE_BACKEND: JVM_IR
|
|
||||||
@@ -1,18 +1,16 @@
|
|||||||
package usage
|
package usage
|
||||||
import kotlin.coroutines.experimental.*
|
import kotlin.coroutines.*
|
||||||
import kotlin.coroutines.experimental.intrinsics.*
|
import kotlin.coroutines.intrinsics.*
|
||||||
|
|
||||||
fun async(x: suspend Controller.() -> Unit) {
|
fun async(x: suspend Controller.() -> Unit) {
|
||||||
x.startCoroutine(Controller(), object : Continuation<Unit> {
|
x.startCoroutine(Controller(), object : Continuation<Unit> {
|
||||||
override val context: CoroutineContext = null!!
|
override val context: CoroutineContext = null!!
|
||||||
override fun resume(value: Unit) {}
|
override fun resumeWith(result: Result<Unit>) {}
|
||||||
|
|
||||||
override fun resumeWithException(exception: Throwable) {}
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
class Controller {
|
class Controller {
|
||||||
suspend fun step(param: Int) = suspendCoroutineOrReturn<Int> { next ->
|
suspend fun step(param: Int) = suspendCoroutineUninterceptedOrReturn<Int> { next ->
|
||||||
next.resume(param + 1)
|
next.resume(param + 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user