[LightTree] Fix positioning of VAR_TYPE_MISMATCH_ON_OVERRIDE in LT

The problem is that `override var b: String` in constructor has token
type `VALUE_PARAMETER`, thus was not considered as declaration.

^KT-62704
This commit is contained in:
Roman Efremov
2024-01-26 16:14:24 +01:00
committed by Space Team
parent 8edb1842a5
commit 3c8855c152
3 changed files with 2 additions and 79 deletions
@@ -141,7 +141,7 @@ object LightTreePositioningStrategies {
val (returnTypeRef, nameIdentifierOrPlaceHolder) = when {
node.tokenType == KtNodeTypes.PROPERTY_ACCESSOR ->
tree.typeReference(node) to tree.accessorNamePlaceholder(node)
node.isDeclaration ->
node.isDeclaration || node.tokenType == KtNodeTypes.VALUE_PARAMETER ->
tree.typeReference(node) to tree.nameIdentifier(node)
else ->
null to null