Files
kotlin/compiler/testData/codegen/bytecodeText/coroutines/doNotReassignContinuation.kt
Denis Zharkov 0b3048f60a Replace trivial usages of suspendCoroutineOrReturn in tests
This is necessary since suspendCoroutineOrReturn gets removed in 1.3
2018-07-09 15:27:19 +03:00

17 lines
423 B
Kotlin
Vendored

// LANGUAGE_VERSION: 1.3
// WITH_RUNTIME
// TREAT_AS_ONE_FILE
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
suspend fun suspendHere(): String = suspendCoroutineUninterceptedOrReturn { x ->
x.resumeWith(SuccessOrFailure.success("OK"))
}
suspend fun suspendThere(param: Int, param2: String, param3: Long): String {
val a = suspendHere()
val b = suspendHere()
return a + b
}
// 1 ASTORE 4