[FIR] Initialize public visibility for class-like declarations at FIR building phase if no modifier is presented

Java resolving subsystem requires calculated visibility for correct disambiguation of supertypes.
But visibility remains `Unknown` for Kotlin class-like declarations during supertypes resolving because `STATUS` resolve phase is performed after `SUPER_TYPES` phase.
To fix the problem, the visibility should be initialized to public at the FIR building phase if no modifier is presented.

^KT-64127 Fixed
This commit is contained in:
Ivan Kochurkin
2023-12-13 23:57:19 +01:00
committed by Space Team
parent ee8d42532b
commit 69b9bfc3e0
915 changed files with 12362 additions and 12164 deletions
@@ -14,8 +14,8 @@ Tower Data Context:
Element 6
Scope: FirScriptDeclarationsScope
Classifiers:
FirRegularClassSymbol public? final? class After_OtherClass : R|kotlin/Any|
FirRegularClassSymbol public? final? class Before_OtherClass : R|kotlin/Any|
FirRegularClassSymbol public final? class After_OtherClass : R|kotlin/Any|
FirRegularClassSymbol public final? class Before_OtherClass : R|kotlin/Any|
Functions
FirNamedFunctionSymbol public? final? fun after_Fun(): R|kotlin/Unit|
FirNamedFunctionSymbol public? final? fun before_Fun(): R|kotlin/Unit|
@@ -41,13 +41,13 @@ Tower Data Context:
public? final? val before_Val: <implicit>
public? get(): <implicit>
public? final? class Before_OtherClass : R|kotlin/Any|
public final? class Before_OtherClass : R|kotlin/Any|
public final fun usage(foo: R|kotlin/Int|): R|kotlin/Unit|
public? final? fun after_Fun(): R|kotlin/Unit|
public? final? val after_Val: <implicit>
public? get(): <implicit>
public? final? class After_OtherClass : R|kotlin/Any|
public final? class After_OtherClass : R|kotlin/Any|
Type: kotlin.script.templates.standard.ScriptTemplateWithArgs
Label: <script>
Element 9
@@ -67,7 +67,7 @@ FILE: [ResolvedTo(IMPORTS)] insideTopLevelFunction.kts
public? final? [ResolvedTo(RAW_FIR)] val before_Val: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
public? final? [ResolvedTo(RAW_FIR)] class Before_OtherClass : R|kotlin/Any| {
public final? [ResolvedTo(RAW_FIR)] class Before_OtherClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|Before_OtherClass| {
LAZY_super<R|kotlin/Any|>
}
@@ -83,7 +83,7 @@ FILE: [ResolvedTo(IMPORTS)] insideTopLevelFunction.kts
public? final? [ResolvedTo(RAW_FIR)] val after_Val: <implicit> = LAZY_EXPRESSION
public? [ResolvedTo(RAW_FIR)] get(): <implicit>
public? final? [ResolvedTo(RAW_FIR)] class After_OtherClass : R|kotlin/Any| {
public final? [ResolvedTo(RAW_FIR)] class After_OtherClass : R|kotlin/Any| {
public? [ResolvedTo(RAW_FIR)] constructor(): R|After_OtherClass| {
LAZY_super<R|kotlin/Any|>
}