FIR: Ensure that the array set argument (on RHS of =) is always mapped
to the last parameter of the set operator function, even if there are missing or too many index arguments.
This commit is contained in:
committed by
teamcityserver
parent
2bb3e94ef7
commit
34e6459014
@@ -642,6 +642,9 @@ object PositioningStrategies {
|
||||
@JvmField
|
||||
val VALUE_ARGUMENTS: PositioningStrategy<KtElement> = object : PositioningStrategy<KtElement>() {
|
||||
override fun mark(element: KtElement): List<TextRange> {
|
||||
if (element is KtBinaryExpression && element.operationToken in KtTokens.ALL_ASSIGNMENTS) {
|
||||
element.left.let { left -> left.unwrapParenthesesLabelsAndAnnotations()?.let { return markElement(it) } }
|
||||
}
|
||||
val qualifiedAccess = when (element) {
|
||||
is KtQualifiedExpression -> element.selectorExpression ?: element
|
||||
else -> element
|
||||
|
||||
Reference in New Issue
Block a user