[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:
committed by
Space Team
parent
ee8d42532b
commit
69b9bfc3e0
+2
-2
@@ -7,7 +7,7 @@ R|<local>/f2|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|><In
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] noReceiverOnLambda.kt
|
||||
public? final? [ResolvedTo(RAW_FIR)] class SomeTest : R|kotlin/Any| {
|
||||
public final? [ResolvedTo(RAW_FIR)] class SomeTest : R|kotlin/Any| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=SomeTest] constructor(): R|SomeTest| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
@@ -15,4 +15,4 @@ FILE: [ResolvedTo(IMPORTS)] noReceiverOnLambda.kt
|
||||
}
|
||||
public final [ResolvedTo(BODY_RESOLVE)] fun dslSpeedTest([ResolvedTo(BODY_RESOLVE)] f2: R|SomeTest.() -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
R|<local>/f2|.R|SubstitutionOverride<kotlin/Function1.invoke: R|kotlin/Unit|><Inapplicable(INAPPLICABLE_ARGUMENTS_MAPPING_ERROR): kotlin/Function1.invoke>#|()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -16,7 +16,7 @@ FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCall5.kt
|
||||
public [ResolvedTo(CONTRACTS)] [ContainingClassKey=A] get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
public? final? [ResolvedTo(RAW_FIR)] object B : A {
|
||||
public final? [ResolvedTo(RAW_FIR)] object B : A {
|
||||
private [ResolvedTo(RAW_FIR)] [ContainingClassKey=B] constructor(): R|B| {
|
||||
LAZY_super<A>
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ R|A|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] superType.kt
|
||||
public? final? [ResolvedTo(SUPER_TYPES)] interface A : R|kotlin/Any| {
|
||||
public final? [ResolvedTo(SUPER_TYPES)] interface A : R|kotlin/Any| {
|
||||
}
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class C : R|A| {
|
||||
public? [ResolvedTo(RAW_FIR)] [ContainingClassKey=C] constructor(): R|C| {
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ FILE: [ResolvedTo(IMPORTS)] superTypeScript.kts
|
||||
SCRIPT: [ResolvedTo(TYPES)] <script-superTypeScript.kts>
|
||||
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
|
||||
|
||||
public? final? [ResolvedTo(SUPER_TYPES)] interface A : R|kotlin/Any| {
|
||||
public final? [ResolvedTo(SUPER_TYPES)] interface A : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class C : R|A| {
|
||||
|
||||
Reference in New Issue
Block a user