Files
kotlin-fork/compiler/fir/raw-fir/psi2fir/testData/rawBuilder/declarations/scriptStatementLevelDestructuringWithAnnotationAsLastStatement.lazyBodies.txt
T
Kirill Rakhman 03fc0fd381 [FIR] Remove FirLambdaArgumentExpression
It's not really necessary if the information about if the lambda was a
trailing lambda can be directly saved in FirAnonymousFunctionExpression.

Removing the FIR node uncovered a couple of bugs
(UNINITIALIZED_ENUM_ENTRY, ERROR_IN_CONTRACT_DESCRIPTION) that were
caused by assuming that a lambda is always a trailing lambda.

#KT-66124
2024-03-13 17:05:48 +00:00

19 lines
910 B
Plaintext
Vendored

FILE: scriptStatementLevelDestructuringWithAnnotationAsLastStatement.kts
SCRIPT: <script-scriptStatementLevelDestructuringWithAnnotationAsLastStatement.kts>
init {
when () {
Boolean(true) -> {
@DestrAnno(LAZY_EXPRESSION) lval <destruct>: <implicit> = IntegerLiteral(0).to#(IntegerLiteral(1))
@LeftAnno(LAZY_EXPRESSION) lval a: <implicit> = LAZY_EXPRESSION
@RightAnno(LAZY_EXPRESSION) lval b: <implicit> = LAZY_EXPRESSION
run#(LAZY_EXPRESSION)
@Destr2Anno(LAZY_EXPRESSION) lval <destruct>: <implicit> = IntegerLiteral(2).to#(IntegerLiteral(3))
@SecondLeftAnno(LAZY_EXPRESSION) lval c: <implicit> = LAZY_EXPRESSION
@SecondRightAnno(LAZY_EXPRESSION) lval d: <implicit> = LAZY_EXPRESSION
}
}
}