[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
This commit is contained in:
committed by
Space Team
parent
1a5fa8d3f6
commit
03fc0fd381
+3
-3
@@ -1513,9 +1513,9 @@ class LightTreeRawFirExpressionBuilder(
|
||||
VALUE_ARGUMENT -> container += convertValueArgument(node)
|
||||
LAMBDA_EXPRESSION,
|
||||
LABELED_EXPRESSION,
|
||||
ANNOTATED_EXPRESSION -> container += buildLambdaArgumentExpression {
|
||||
source = valueArguments.toFirSourceElement()
|
||||
expression = getAsFirExpression(node)
|
||||
ANNOTATED_EXPRESSION,
|
||||
-> container += getAsFirExpression<FirAnonymousFunctionExpression>(node).apply {
|
||||
replaceIsTrailingLambda(newIsTrailingLambda = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user