Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/coroutinesBinary.kt
T
2016-06-08 18:53:16 +03:00

25 lines
375 B
Kotlin
Vendored

// FILE: A.kt
package a
class Controller {
suspend fun suspendHere(x: Continuation<String>) {
x.resume("OK")
}
}
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
c(Controller()).resume(Unit)
}
// FILE: B.kt
import a.builder
fun box(): String {
var result = ""
builder {
result = suspendHere()
}
return result
}