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
@@ -17,6 +17,7 @@ import org.jetbrains.kotlin.analysis.api.symbols.KtClassLikeSymbol
import org.jetbrains.kotlin.kdoc.psi.impl.KDocName
import org.jetbrains.kotlin.name.FqName
import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.kotlin.psi.KtThisExpression
internal class KtFe10ReferenceShortener(
override val analysisSession: KtFe10AnalysisSession,
@@ -41,6 +42,7 @@ internal class KtFe10ReferenceShortener(
override val starImportsToAdd: Set<FqName> get() = emptySet()
override val listOfTypeToShortenInfo: List<TypeToShortenInfo> get() = emptyList()
override val listOfQualifierToShortenInfo: List<QualifierToShortenInfo> get() = emptyList()
override val thisLabelsToShorten: List<ThisLabelToShortenInfo> = emptyList()
override val kDocQualifiersToShorten: List<SmartPsiElementPointer<KDocName>> get() = emptyList()
override val isEmpty: Boolean get() = true