Files
kotlin-fork/compiler/testData/codegen/box/extensionFunctions/contextReceivers/localDeclaration.kt
T
2021-12-02 20:24:16 +03:00

15 lines
242 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_FIR: JVM_IR
interface A {
val ok get() = "OK"
}
class B : A
fun box(): String {
context(A) fun result() = ok
return with(B()) {
result()
}
}