[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:
@@ -13,7 +13,7 @@ FILE: annotatedLocalClass.kt
|
||||
}
|
||||
|
||||
@R|Ann|() local final class Local : R|kotlin/Any| {
|
||||
public[local] constructor(): R|Local| {
|
||||
public constructor(): R|Local| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,15 +1,15 @@
|
||||
FILE: innerClassInAnonymousObject.kt
|
||||
public final val x: R|<anonymous>| = object : R|kotlin/Any| {
|
||||
private[local] constructor(): R|<anonymous>| {
|
||||
private constructor(): R|<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
local final class Nested : R|kotlin/Any| {
|
||||
public[local] constructor(): R|<anonymous>.Nested| {
|
||||
public constructor(): R|<anonymous>.Nested| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public[local] final fun foo(): R|kotlin/Unit| {
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-8
@@ -10,11 +10,11 @@ FILE: localClassesWithImplicit.kt
|
||||
}
|
||||
|
||||
local final class A : R|kotlin/Any| {
|
||||
public[local] constructor(): R|A| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public[local] final fun foo(): R|kotlin/Int| {
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
^foo R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
^ when () {
|
||||
@@ -31,7 +31,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public[local] final fun bar(): R|kotlin/Int| {
|
||||
public final fun bar(): R|kotlin/Int| {
|
||||
^bar R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/b|.<Unresolved name: length>#
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
@@ -40,18 +40,18 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public[local] final fun baz(): R|kotlin/Int| {
|
||||
public final fun baz(): R|kotlin/Int| {
|
||||
^baz Int(1)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lval x: R|<anonymous>| = object : R|kotlin/Any| {
|
||||
private[local] constructor(): R|<anonymous>| {
|
||||
private constructor(): R|<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public[local] final fun foo(): R|kotlin/Int| {
|
||||
public final fun foo(): R|kotlin/Int| {
|
||||
^foo R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
^ when () {
|
||||
@@ -68,7 +68,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public[local] final fun bar(): R|kotlin/Int| {
|
||||
public final fun bar(): R|kotlin/Int| {
|
||||
^bar R|/myRun|<R|kotlin/Int|>(<L> = myRun@fun <anonymous>(): R|kotlin/Int| <kind=UNKNOWN> {
|
||||
R|<local>/a|.R|kotlin/String.length|
|
||||
R|<local>/b|.<Unresolved name: length>#
|
||||
@@ -77,7 +77,7 @@ FILE: localClassesWithImplicit.kt
|
||||
)
|
||||
}
|
||||
|
||||
public[local] final fun baz(): R|kotlin/Int| {
|
||||
public final fun baz(): R|kotlin/Int| {
|
||||
^baz Int(1)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ FILE: propertiesAndInitBlocks.kt
|
||||
}
|
||||
|
||||
local final class InitializerLocalClass : R|kotlin/Any| {
|
||||
public[local] constructor(): R|InitializerLocalClass| {
|
||||
public constructor(): R|InitializerLocalClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ FILE: propertiesAndInitBlocks.kt
|
||||
)
|
||||
public get(): R|kotlin/Unit| {
|
||||
local final class GetterLocalClass : R|kotlin/Any| {
|
||||
public[local] constructor(): R|GetterLocalClass| {
|
||||
public constructor(): R|GetterLocalClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user