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

28 lines
397 B
Kotlin
Vendored

interface A {
fun f() {}
}
class B : A
fun testLocalFunction() {
context(A)
fun local() {
<!UNRESOLVED_REFERENCE!>f<!>()
}
with(B()) {
local()
}
local()
}
fun testLocalClass() {
context(A)
class Local {
fun local() {
<!UNRESOLVED_REFERENCE!>f<!>()
}
}
with(B()) {
Local().local()
}
Local()
}