KT-62675 [AA] Simplify ElementToShorten hierarchy
Clearly separate `ShortenKDocQualifier` from it, it does not belong there for now
This commit is contained in:
+5
-6
@@ -398,11 +398,13 @@ private class ShortenQualifier(
|
|||||||
override val importAllInParent: Boolean = false
|
override val importAllInParent: Boolean = false
|
||||||
) : ElementToShorten()
|
) : ElementToShorten()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* N.B. Does not subclass [ElementToShorten] because currently
|
||||||
|
* there's no reason to do that.
|
||||||
|
*/
|
||||||
private class ShortenKDocQualifier(
|
private class ShortenKDocQualifier(
|
||||||
val element: KDocName,
|
val element: KDocName,
|
||||||
override val nameToImport: FqName? = null,
|
)
|
||||||
override val importAllInParent: Boolean = false
|
|
||||||
) : ElementToShorten()
|
|
||||||
|
|
||||||
private class CollectingVisitor(private val collector: ElementsToShortenCollector) : FirVisitorVoid() {
|
private class CollectingVisitor(private val collector: ElementsToShortenCollector) : FirVisitorVoid() {
|
||||||
private val visitedProperty = mutableSetOf<FirProperty>()
|
private val visitedProperty = mutableSetOf<FirProperty>()
|
||||||
@@ -1258,9 +1260,6 @@ private class ElementsToShortenCollector(
|
|||||||
is ShortenQualifier -> addElementToShorten(
|
is ShortenQualifier -> addElementToShorten(
|
||||||
elementInfoToShorten.element, elementInfoToShorten.shortenedRef, nameToImport, isImportWithStar
|
elementInfoToShorten.element, elementInfoToShorten.shortenedRef, nameToImport, isImportWithStar
|
||||||
)
|
)
|
||||||
is ShortenKDocQualifier -> addElementToShorten(
|
|
||||||
elementInfoToShorten.element, shortenedRef = null, nameToImport, isImportWithStar
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user