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

18 lines
215 B
Kotlin
Vendored

class A
class B
class C
context(A)
fun B.f() {}
fun main() {
val b = B()
b.<!NO_CONTEXT_RECEIVER!>f()<!>
with(A()) {
b.f()
}
with(C()) {
b.<!NO_CONTEXT_RECEIVER!>f()<!>
}
}