FIR: Support checking PRIVATE_TO_THIS visibility #KT-49875 Fixed

This commit is contained in:
Mikhail Glukhikh
2022-07-12 10:25:42 +02:00
committed by Space
parent 83200f8774
commit d16e5e5e50
7 changed files with 38 additions and 17 deletions
@@ -15,19 +15,19 @@ class Test<in I> {
apply(this.foo())
with(Test<I>()) {
apply(foo()) // resolved to this@Test.foo
apply(this.foo())
apply(this@with.foo())
apply(this.<!INVISIBLE_REFERENCE!>foo<!>())
apply(this@with.<!INVISIBLE_REFERENCE!>foo<!>())
apply(this@Test.foo())
}
}
fun <I> test(t: Test<I>) {
t.apply(t.foo())
t.apply(t.<!INVISIBLE_REFERENCE!>foo<!>())
}
companion object {
fun <I> test(t: Test<I>) {
t.apply(t.foo())
t.apply(t.<!INVISIBLE_REFERENCE!>foo<!>())
}
}
}
@@ -15,19 +15,19 @@ class Test<in I, out O> {
apply(this.i)
with(Test<I, O>()) {
apply(i) // resolved to this@Test.i
apply(this.i)
apply(this@with.i)
apply(this.<!INVISIBLE_REFERENCE!>i<!>)
apply(this@with.<!INVISIBLE_REFERENCE!>i<!>)
apply(this@Test.i)
}
}
fun <I, O> test(t: Test<I, O>) {
t.apply(t.i)
t.apply(t.<!INVISIBLE_REFERENCE!>i<!>)
}
companion object {
fun <I, O> test(t: Test<I, O>) {
t.apply(t.i)
t.apply(t.<!INVISIBLE_REFERENCE!>i<!>)
}
}
}
@@ -15,19 +15,19 @@ class Test<in I, out O> {
this.i = getT()
with(Test<I, O>()) {
i = getT() // resolved to this@Test.i
this.i = getT()
this@with.i = getT()
this.<!INVISIBLE_REFERENCE!>i<!> = getT()
this@with.<!INVISIBLE_REFERENCE!>i<!> = getT()
this@Test.i = getT()
}
}
fun <I, O> test(t: Test<I, O>) {
t.i = getT()
t.<!INVISIBLE_REFERENCE!>i<!> = getT()
}
companion object {
fun <I, O> test(t: Test<I, O>) {
t.i = getT()
t.<!INVISIBLE_REFERENCE!>i<!> = getT()
}
}
}