[FIR] make script destructuring declaration entry initializer lazy expression

This change is required to properly support such declarations in lazy
resolution mode as we usually replaced initializers with lazy
expressions during the body calculation phase

^KT-62840
This commit is contained in:
Dmitrii Gridin
2024-02-09 23:14:50 +01:00
committed by Space Team
parent c0f4f7fefd
commit 312feb3dca
9 changed files with 135 additions and 67 deletions
@@ -23,7 +23,7 @@ FILE: [ResolvedTo(IMPORTS)] destructuringScript.kts
public [ResolvedTo(IMPLICIT_TYPES_BODY_RESOLVE)] get(): R|kotlin/Pair<kotlin/Int, kotlin/Int>|
[ResolvedTo(BODY_RESOLVE)] [DestructuringDeclarationContainerVariableMarkerKey=true] lval <destruct>: R|kotlin/Pair<kotlin/Int, kotlin/Int>| = R|/pair|
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val first: <implicit> = R|<local>/<destruct>|.component1#()
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val first: <implicit> = LAZY_EXPRESSION
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val last: <implicit> = R|<local>/<destruct>|.component2#()
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val last: <implicit> = LAZY_EXPRESSION