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

21 lines
198 B
Kotlin
Vendored

// !LANGUAGE: +ContextReceivers
class A {
fun h1() {}
}
class B {
fun h2() {}
}
fun B.foo() {
<!UNRESOLVED_REFERENCE!>h1<!>()
h2()
}
context(A)
fun B.bar() {
h1()
h2()
}