[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:
Dmitrii Gridin
2023-11-22 12:21:47 +01:00
committed by Space Team
parent e3d91741ca
commit 5183019cb8
207 changed files with 2011 additions and 1019 deletions
@@ -11,7 +11,7 @@ FILE: [ResolvedTo(IMPORTS)] constructorPropertyScript.kts
SCRIPT: [ResolvedTo(TYPES)] <script-constructorPropertyScript.kts>
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
public final [ResolvedTo(STATUS)] class Abc : R|kotlin/Any| {
public final [ResolvedTo(ANNOTATION_ARGUMENTS)] class Abc : R|kotlin/Any| {
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Abc] constructor([ResolvedTo(BODY_RESOLVE)] [CorrespondingProperty=/Abc.i] i: R|kotlin/Int| = Int(4)): R|Abc| {
super<R|kotlin/Any|>()
}
@@ -19,4 +19,4 @@ FILE: [ResolvedTo(IMPORTS)] constructorPropertyScript.kts
public final [ResolvedTo(BODY_RESOLVE)] [IsFromPrimaryConstructor=true] val i: R|kotlin/Int| = R|<local>/i|
public [ResolvedTo(BODY_RESOLVE)] [ContainingClassKey=Abc] get(): R|kotlin/Int|
}
}