Files
kotlin-fork/compiler/testData/diagnostics/tests/variance/privateToThis/SetVar.fir.kt
T
Dmitriy Novozhilov f283f2db43 [FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics:
- NONE_APPLICABLE more many inapplicable candidates
- HIDDEN for visible candidates
2020-07-28 20:46:56 +03:00

38 lines
675 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.<!HIDDEN!>i<!> = getT()
}