[FIR] Improve INVISIBLE_REFERENCE message

Report the nearest invisible containing declaration in cases where
the declaration itself is visible.

#KT-53820 Fixed
This commit is contained in:
Kirill Rakhman
2023-06-19 15:02:57 +02:00
committed by Space Team
parent 6a073e0b17
commit 911e62257a
24 changed files with 237 additions and 98 deletions
@@ -1,3 +1,4 @@
// RENDER_DIAGNOSTICS_FULL_TEXT
//FILE:a.kt
package a
@@ -29,9 +30,13 @@ private class D {
package b
import a.A
import a.A.Companion.foo
import a.<!INVISIBLE_REFERENCE!>B<!>
import a.<!INVISIBLE_REFERENCE!>B<!>.Companion.bar
import a.C
import a.C.<!INVISIBLE_REFERENCE!>Companion<!>.baz
import a.<!INVISIBLE_REFERENCE!>D<!>
import a.<!INVISIBLE_REFERENCE!>D<!>.<!INVISIBLE_REFERENCE!>Companion<!>.quux
fun test() {
f(A)