FIR checker: fix position strategy for UNRESOLVED_LABEL

This commit is contained in:
Tianyu Geng
2021-06-25 13:16:58 -07:00
committed by Ivan Kochurkin
parent 45d31fdba2
commit bcf6202863
24 changed files with 58 additions and 35 deletions
@@ -940,6 +940,12 @@ object PositioningStrategies {
}
}
val LABEL: PositioningStrategy<KtElement> = object : PositioningStrategy<KtElement>() {
override fun mark(element: KtElement): List<TextRange> {
return super.mark((element as? KtExpressionWithLabel)?.labelQualifier ?: element)
}
}
/**
* @param locateReferencedName whether to remove any nested parentheses while locating the reference element. This is useful for
* diagnostics on super and unresolved references. For example, with the following, only the part inside the parentheses should be