Files
kotlin-fork/compiler/testData/codegen/box/callableReference/adaptedReferences/suspendConversion/nullableParameter.kt
T
2021-10-02 06:14:35 +00:00

23 lines
403 B
Kotlin
Vendored

// IGNORE_BACKEND: WASM
// WASM_MUTE_REASON: COROUTINES
// !LANGUAGE: +SuspendConversion
// WITH_RUNTIME
// WITH_COROUTINES
import helpers.*
import kotlin.coroutines.*
import kotlin.coroutines.intrinsics.*
fun runSuspend(c: (suspend () -> Unit)?) {
c?.startCoroutine(EmptyContinuation)
}
var test = "failed"
fun foo() { test = "OK" }
fun box(): String {
runSuspend(::foo)
return test
}