[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
@@ -12,7 +12,7 @@ FILE: [ResolvedTo(IMPORTS)] destructionWithNoRValueScript.kts
[ResolvedTo(RAW_FIR)] lval args: R|kotlin/Array<kotlin/String>|
[ResolvedTo(BODY_RESOLVE)] [DestructuringDeclarationContainerVariableMarkerKey=true] lval <destruct>: <ERROR TYPE REF: Initializer required for destructuring declaration> = ERROR_EXPR(Initializer required for destructuring declaration)
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val o: <implicit> = R|<local>/<destruct>|.component1#()
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val o: <implicit> = LAZY_EXPRESSION
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val r: <implicit> = R|<local>/<destruct>|.component2#()
public final [ResolvedTo(RAW_FIR)] [DestructuringDeclarationContainerVariableKey=<local>/<destruct>] val r: <implicit> = LAZY_EXPRESSION