FIR: fix private-to-this corner case with outer class type parameter
Related to KT-49875
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
class A<in T>(t: T) {
|
||||
private val t: T = t // PRIVATE_TO_THIS
|
||||
|
||||
private val i: B = B()
|
||||
|
||||
fun test() {
|
||||
val x: T = t // Ok
|
||||
val y: T = this.t // Ok
|
||||
@@ -11,4 +13,14 @@ class A<in T>(t: T) {
|
||||
fun foo(a: A<String>) {
|
||||
val x: String = a.<!INVISIBLE_MEMBER!>t<!> // Invisible!
|
||||
}
|
||||
|
||||
fun bar(a: A<*>) {
|
||||
a.<!INVISIBLE_MEMBER!>t<!> // Invisible!
|
||||
}
|
||||
|
||||
inner class B {
|
||||
fun baz(a: A<*>) {
|
||||
a.i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user