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

18 lines
257 B
Kotlin
Vendored

class A
class B
class C
context(A) fun B.f() {}
context(A) fun B.g() {
f()
}
context(A) fun C.h() {
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>f<!>()
}
fun A.q(b: B) {
with(b) {
f()
}
<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>f<!>()
}