Files
kotlin-fork/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.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
688 B
Kotlin
Vendored

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