acd8c4503b
#KT-44533 Fixed
39 lines
542 B
Kotlin
Vendored
39 lines
542 B
Kotlin
Vendored
// !JVM_DEFAULT_MODE: enable
|
|
// TARGET_BACKEND: JVM
|
|
// JVM_TARGET: 1.8
|
|
// WITH_COROUTINES
|
|
// WITH_RUNTIME
|
|
|
|
import kotlin.coroutines.*
|
|
import helpers.*
|
|
|
|
interface S {
|
|
suspend fun foo()
|
|
}
|
|
|
|
interface T : S {
|
|
@JvmDefault
|
|
override suspend fun foo() {
|
|
bar()
|
|
}
|
|
|
|
fun bar()
|
|
}
|
|
|
|
object O : T {
|
|
var result = ""
|
|
|
|
override fun bar() {
|
|
result = "OK"
|
|
}
|
|
}
|
|
|
|
fun builder(block: suspend () -> Unit) {
|
|
block.startCoroutine(EmptyContinuation)
|
|
}
|
|
|
|
fun box(): String {
|
|
builder { O.foo() }
|
|
return O.result
|
|
}
|