FIR IDE: Add visibility checks to the completion

Visibility checks currently do not work in some cases, for example:

- public nested class of private class is seen globally
- private_for_this does not work
- some other cases I am not yet aware of

If `FirVisibilityChecker.isVisible` fix those issues, they will be fixed
automatically in the completion
This commit is contained in:
Roman Golyshev
2021-03-30 14:48:38 +03:00
committed by Space
parent 78b2324a51
commit e0fca9d2f6
24 changed files with 303 additions and 32 deletions
@@ -3,4 +3,6 @@ package abc
val String.helloProp1: Int get() = 1
val String.helloProp2: Int get() = 2
val Int.helloProp3: Int get() = 3
val helloProp4: Int = 4
val helloProp4: Int = 4
private val String.helloPropPrivate get() = 1
@@ -1,3 +1,4 @@
// FIR_COMPARISON
package first
fun firstFun() {
@@ -5,8 +6,9 @@ fun firstFun() {
a.hello<caret>
}
// EXIST: { lookupString: "helloProp1", attributes: "bold" }
// EXIST: { lookupString: "helloProp2", attributes: "bold" }
// EXIST: helloProp1
// EXIST: helloProp2
// ABSENT: helloProp3
// ABSENT: helloProp4
// ABSENT: helloPropPrivate
// NOTHING_ELSE