[FIR] make script destructuring declaration 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:
committed by
Space Team
parent
898c8c002e
commit
9ca0bdcb80
+4
-2
@@ -1,15 +1,17 @@
|
||||
FILE: scriptLevelDestructuringWithAnnotation.kts
|
||||
SCRIPT: <script-scriptLevelDestructuringWithAnnotation.kts>
|
||||
|
||||
@DestrAnno(LAZY_EXPRESSION) lval <destruct>: <implicit> = IntegerLiteral(0).to#(IntegerLiteral(1))
|
||||
@DestrAnno(LAZY_EXPRESSION) lval <destruct>: <implicit> = LAZY_EXPRESSION
|
||||
@LeftAnno(LAZY_EXPRESSION) public final val a: <implicit> = R|<local>/<destruct>|.component1#()
|
||||
|
||||
|
||||
@RightAnno(LAZY_EXPRESSION) public final val b: <implicit> = R|<local>/<destruct>|.component2#()
|
||||
|
||||
|
||||
@Destr2Anno(LAZY_EXPRESSION) lval <destruct>: <implicit> = IntegerLiteral(2).to#(IntegerLiteral(3))
|
||||
@Destr2Anno(LAZY_EXPRESSION) lval <destruct>: <implicit> = LAZY_EXPRESSION
|
||||
@SecondLeftAnno(LAZY_EXPRESSION) public final val c: <implicit> = R|<local>/<destruct>|.component1#()
|
||||
|
||||
|
||||
@SecondRightAnno(LAZY_EXPRESSION) public final val d: <implicit> = R|<local>/<destruct>|.component2#()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user