Files
kotlin-fork/compiler/testData/codegen/box/fir/SuspendExtension.kt
T
2021-01-23 10:56:40 +03:00

19 lines
313 B
Kotlin
Vendored

// TARGET_BACKEND: JVM
// IGNORE_BACKEND: JVM
// MODULE: lib
// FILE: A.kt
class CoroutineScope
suspend fun <T> runWithTimeout(
block: suspend CoroutineScope.() -> T
): T? = null
// MODULE: main(lib)
// FILE: B.kt
suspend fun foo(): Boolean = runWithTimeout {
false
} ?: true
fun box(): String = "OK"