FIR: fix private-to-this corner case with outer class type parameter

Related to KT-49875
This commit is contained in:
Mikhail Glukhikh
2022-07-13 16:43:11 +02:00
committed by Space
parent d16e5e5e50
commit 623f832bfd
5 changed files with 58 additions and 2 deletions
@@ -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
}
}
}