Files
kotlin-fork/compiler/testData/diagnostics/tests/variance/privateToThis/FunctionCall.fir.kt
T
pyos e6d923f65c FIR: rename HIDDEN to INVISIBLE_REFERENCE
Some of them should be INVISIBLE_MEMBER though
2021-04-21 16:18:21 +03:00

38 lines
664 B
Kotlin
Vendored

fun <T> getT(): T = null!!
class Test<in I> {
private fun foo() : I = getT()
fun apply(i: I) {}
init {
foo()
this.foo()
}
fun test() {
apply(foo())
apply(this.foo())
with(Test<I>()) {
apply(foo()) // resolved to this@Test.foo
apply(this.foo())
apply(this@with.foo())
apply(this@Test.foo())
}
}
fun <I> test(t: Test<I>) {
t.apply(t.foo())
}
companion object {
fun <I> test(t: Test<I>) {
t.apply(t.foo())
}
}
}
fun <I> test(t: Test<I>) {
t.apply(t.<!INVISIBLE_REFERENCE!>foo<!>())
}