[FIR] Refactor effective visibility calculation

Before this commit, we had effective visibility as a part of FIR status,
so it was integrated into the full pipeline. In this commit,
we introduced "effective visibility as a service" which is now used
only by exposed visibility checker. This allows us to make the thing
universal for all FIR nodes, including nodes for Java / deserialized.
This commit is contained in:
Nick
2020-07-15 17:23:21 +03:00
committed by Mikhail Glukhikh
parent b15e32936e
commit 7145caca40
95 changed files with 713 additions and 484 deletions
@@ -11,7 +11,7 @@ FILE: anonymousObjectByDelegate.kt
object : R|B| {
local final field <$$delegate_0>: R|B|
private[local] constructor(): R|<anonymous>| {
private constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
this@R|/<anonymous>|.R|<local>/<$$delegate_0>| = this@R|/test_1|.R|/A.b|
}
@@ -23,7 +23,7 @@ FILE: anonymousObjectByDelegate.kt
object : R|B| {
local final field <$$delegate_0>: R|B|
private[local] constructor(): R|<anonymous>| {
private constructor(): R|<anonymous>| {
super<R|kotlin/Any|>()
this@R|/<anonymous>|.R|<local>/<$$delegate_0>| = this@R|/test_2|.R|/A.b|
}
@@ -6,13 +6,13 @@ FILE: incompatibleModifiers.kt
}
private final class B : R|kotlin/Any| {
public[private] constructor(): R|B| {
public constructor(): R|B| {
super<R|kotlin/Any|>()
}
}
protected final class C : R|kotlin/Any| {
public[protected] constructor(): R|C| {
public constructor(): R|C| {
super<R|kotlin/Any|>()
}
@@ -95,13 +95,13 @@ FILE: incompatibleModifiers.kt
}
private open class L : R|K| {
public[private] constructor(): R|L| {
public constructor(): R|L| {
super<R|K|>()
}
}
private abstract class M : R|K| {
public[private] constructor(): R|M| {
public constructor(): R|M| {
super<R|K|>()
}
@@ -1,19 +1,19 @@
FILE: localAnnotationClass.kt
public final fun foo(): R|kotlin/Unit| {
local final annotation class Ann : R|kotlin/Annotation| {
public[local] constructor(): R|Ann| {
public constructor(): R|Ann| {
super<R|kotlin/Any|>()
}
}
@R|ERROR CLASS: Symbol not found, for `Anno`|() local final class Local : R|kotlin/Any| {
public[local] constructor(): R|Local| {
public constructor(): R|Local| {
super<R|kotlin/Any|>()
}
local final annotation class Nested : R|kotlin/Annotation| {
public[local] constructor(): R|Local.Nested| {
public constructor(): R|Local.Nested| {
super<R|kotlin/Any|>()
}