mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
20 lines
475 B
Kotlin
Vendored
20 lines
475 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// COMMON_COROUTINES_TEST
|
|
import COROUTINES_PACKAGE.*
|
|
import COROUTINES_PACKAGE.intrinsics.*
|
|
|
|
var p: Int = 5846814
|
|
private suspend fun withoutInline() {
|
|
val c = { c: Continuation<Unit> ->
|
|
if (p > 52158) Unit else COROUTINE_SUSPENDED
|
|
}
|
|
|
|
return suspendCoroutineUninterceptedOrReturn(c)
|
|
}
|
|
|
|
private suspend fun withInline() {
|
|
return suspendCoroutineUninterceptedOrReturn { c ->
|
|
if (p > 52158) Unit else COROUTINE_SUSPENDED
|
|
}
|
|
}
|