[FIR] Ignore anonymous functions during annotation argument phase
Anonymous functions (lambdas) are not allowed as annotation arguments. However, because it is still possible to parse code written this way, it must be handled without exception. So ignore these expressions when processing annotation arguments. #KT-59565 Fixed
This commit is contained in:
+14
@@ -295,6 +295,20 @@ abstract class AbstractFirExpressionsResolveTransformerForAnnotations(transforme
|
||||
return arrayLiteral
|
||||
}
|
||||
|
||||
override fun transformAnonymousObjectExpression(
|
||||
anonymousObjectExpression: FirAnonymousObjectExpression,
|
||||
data: ResolutionMode,
|
||||
): FirStatement {
|
||||
return anonymousObjectExpression
|
||||
}
|
||||
|
||||
override fun transformAnonymousFunctionExpression(
|
||||
anonymousFunctionExpression: FirAnonymousFunctionExpression,
|
||||
data: ResolutionMode,
|
||||
): FirStatement {
|
||||
return anonymousFunctionExpression
|
||||
}
|
||||
|
||||
override fun shouldComputeTypeOfGetClassCallWithNotQualifierInLhs(getClassCall: FirGetClassCall): Boolean {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user