[K2]: Missing error and miscompilation in destructuring declaration delegation
In convertDestructingDeclaration, property delegates are mistakenly treated as valid expressions for destructuring, but they should be ignored. #KT-65021 Fixed
This commit is contained in:
committed by
Space Team
parent
b0367d9399
commit
1d817e2ace
+2
@@ -1475,6 +1475,8 @@ class LightTreeRawFirDeclarationBuilder(
|
||||
MODIFIER_LIST -> annotations += convertAnnotationList(it)
|
||||
VAR_KEYWORD -> isVar = true
|
||||
DESTRUCTURING_DECLARATION_ENTRY -> entries += convertDestructingDeclarationEntry(it)
|
||||
// Property delegates should be ignored as they aren't a valid initializers
|
||||
PROPERTY_DELEGATE -> {}
|
||||
else -> if (it.isExpression()) firExpression =
|
||||
expressionConverter.getAsFirExpression(it, "Initializer required for destructuring declaration")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user