mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
24 lines
430 B
Kotlin
Vendored
24 lines
430 B
Kotlin
Vendored
class Controller {
|
|
suspend fun suspendHere(x: Continuation<String>) {
|
|
}
|
|
}
|
|
|
|
|
|
fun builder(coroutine c: Controller.() -> Continuation<Unit>) {
|
|
c(Controller()).resume(Unit)
|
|
}
|
|
|
|
fun box(): String {
|
|
|
|
for (i in 1..3) {
|
|
builder {
|
|
if (suspendHere() != "OK") throw java.lang.RuntimeException("fail 1")
|
|
}
|
|
}
|
|
|
|
return "OK"
|
|
}
|
|
|
|
// 1 GETSTATIC kotlin/Unit.INSTANCE : Lkotlin/Unit;
|
|
// 1 GETSTATIC
|