KT-62675 [AA] Handle labeled this expressions in reference shortener

At the moment, there is no good way to meaningfully filter `this`
expressions. The filters for the reference shortener can work only with
symbols, and it does not make a lot of sense to check any particular
symbol when deciding whether to shorten a labeled `this` expression.

We would probably need a better API for the shortener to be able
to filter more precisely (see KT-63555)

^KT-62675 Fixed
This commit is contained in:
Roman Golyshev
2023-11-06 12:17:13 +01:00
committed by teamcity
parent d47557067c
commit 4f5926a88f
23 changed files with 393 additions and 8 deletions
@@ -24,6 +24,11 @@ internal object ShorteningResultsRenderer {
appendLine("[qualifier] $it${shortenedRef?.let { ref -> " -> $ref" } ?: ""}")
}
}
shortening.thisLabelsToShorten.forEach { thisLabel ->
thisLabel.labelToShorten.element?.text?.let {
appendLine("[thisLabel] $it")
}
}
shortening.kDocQualifiersToShorten.forEach { kdoc ->
kdoc.element?.text?.let {
appendLine("[kdoc] $it")