Files
kotlin-fork/compiler/testData/diagnostics/tests/extensions/contextReceivers/withExplicitReceiver.fir.kt
T
2021-12-02 20:24:16 +03:00

20 lines
206 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
open class A
class B
class C: A()
context(A)
fun B.f() {}
fun main() {
val b = B()
b.f()
with(A()) {
b.f()
}
with(C()) {
b.f()
}
}