[LL FIR] resolve class before constructor
This is required to have stable resolution order to avoid concurrent modifications and correct resolution context. This also fixes KT-63700 as a super call expands only during body resolution in the case of secondary constructor ^KT-63042 ^KT-63700 Fixed
This commit is contained in:
committed by
Space Team
parent
e3d91741ca
commit
5183019cb8
+1
-1
@@ -13,7 +13,7 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructo
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class A : R|B| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class A : R|B| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/A.f] f: R|kotlin/String| = <strcat>(Int(42))): R|A| {
|
||||
super<R|B|>(Int(1), [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
R|/foo|()
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructo
|
||||
|
||||
}
|
||||
|
||||
public final [ResolvedTo(STATUS)] class A : R|B| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class A : R|B| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor(): R|A| {
|
||||
super<R|B|>(Int(1), [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
R|/foo|()
|
||||
@@ -29,4 +29,4 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallAndExplicitConstructo
|
||||
}
|
||||
|
||||
public final [ResolvedTo(CONTRACTS)] fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -13,7 +13,7 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallFromSecondaryConstruc
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class B : R|A| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class B : R|A| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=B] constructor([ResolvedTo(STATUS)] i: R|kotlin/Int|): R|B| {
|
||||
LAZY_super<<implicit>>
|
||||
}
|
||||
@@ -27,4 +27,4 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallFromSecondaryConstruc
|
||||
|
||||
}
|
||||
public final [ResolvedTo(CONTRACTS)] fun foo([ResolvedTo(CONTRACTS)] any: R|kotlin/Any|): R|kotlin/Unit| {
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -13,7 +13,7 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallFromSingleSecondaryCo
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class B : R|A| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class B : R|A| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=B] constructor([ResolvedTo(BODY_RESOLVE)] i: R|kotlin/Int|): R|B| {
|
||||
super<R|A|>([ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
R|/foo|(R|<local>/i|)
|
||||
@@ -23,4 +23,4 @@ FILE: [ResolvedTo(IMPORTS)] callInsideLambdaInsideSuperCallFromSingleSecondaryCo
|
||||
|
||||
}
|
||||
public final [ResolvedTo(CONTRACTS)] fun foo([ResolvedTo(CONTRACTS)] any: R|kotlin/Any|): R|kotlin/Unit| {
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -7,7 +7,7 @@ this<R|A|>(Int(1))
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] constructorDelegationThisCall.kt
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=A] constructor([ResolvedTo(STATUS)] x: R|kotlin/Int|): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
@@ -16,4 +16,4 @@ FILE: [ResolvedTo(IMPORTS)] constructorDelegationThisCall.kt
|
||||
this<R|A|>(Int(1))
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -7,7 +7,7 @@ FIR element rendered:
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsidePropertyInsideConstructor.kt
|
||||
public final [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/A.i] i: R|() -> kotlin/Unit| = [ResolvedTo(RAW_FIR)] fun <anonymous>(): R|kotlin/Unit| <inline=Unknown> {
|
||||
local final [ResolvedTo(RAW_FIR)] fun foo(): R|kotlin/String| {
|
||||
^foo <Unresolved name: B>#.<Unresolved name: prop>#.R|kotlin/toString|()
|
||||
@@ -21,4 +21,4 @@ FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsidePropertyInsideConstructor.kt
|
||||
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val i: R|() -> kotlin/Unit| = R|<local>/i|
|
||||
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=A] get(): R|() -> kotlin/Unit|
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -7,7 +7,7 @@ R|/A.prop|
|
||||
|
||||
FIR FILE:
|
||||
FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCall3.kt
|
||||
public open [ResolvedTo(STATUS)] class A : R|kotlin/Any| {
|
||||
public open [ResolvedTo(EXPECT_ACTUAL_MATCHING)] class A : R|kotlin/Any| {
|
||||
public [ResolvedTo(EXPECT_ACTUAL_MATCHING)] [ContainingClassKey=A] constructor([ResolvedTo(EXPECT_ACTUAL_MATCHING)] init: R|A.() -> kotlin/Unit|): R|A| {
|
||||
LAZY_super<R|kotlin/Any|>
|
||||
}
|
||||
@@ -37,4 +37,4 @@ FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCall3.kt
|
||||
super<R|A|>()
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -28,7 +28,7 @@ FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCall5.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final [ResolvedTo(STATUS)] class G : R|A| {
|
||||
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class G : R|A| {
|
||||
public [ResolvedTo(STATUS)] [ContainingClassKey=G] error_constructor(): R|G| {
|
||||
LAZY_super<R|A|>
|
||||
}
|
||||
@@ -43,4 +43,4 @@ FILE: [ResolvedTo(IMPORTS)] qualifiedCallInsideSuperCall5.kt
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user