blob: 7da83b4f5e40d253d793418f526ff1287b976b1e [file]
// WITH_COROUTINES
// WITH_STDLIB
// FILE: 1.kt
package test
suspend inline fun test(crossinline x: suspend () -> Unit): Unit = object {
inline suspend fun f(): Unit = x()
}.f()
// FILE: 2.kt
import test.*
import kotlin.coroutines.*
import helpers.*
fun builder(c: suspend () -> Unit) {
c.startCoroutine(EmptyContinuation)
}
var result = "Fail"
fun box(): String {
builder {
test {
result = "OK"
}
}
return result
}