[FIR] reference shortener should not touch fake sources
e.g. implicit types can't be shortened. On the other hand, requesting textRange means building ast which might be slow, especially for compiled code
This commit is contained in:
+1
-1
@@ -368,7 +368,7 @@ private class ElementsToShortenCollector(
|
||||
}
|
||||
|
||||
private fun processTypeRef(resolvedTypeRef: FirResolvedTypeRef) {
|
||||
val wholeTypeReference = resolvedTypeRef.psi as? KtTypeReference ?: return
|
||||
val wholeTypeReference = resolvedTypeRef.realPsi as? KtTypeReference ?: return
|
||||
if (!wholeTypeReference.textRange.intersects(selection)) return
|
||||
|
||||
val wholeClassifierId = resolvedTypeRef.type.lowerBoundIfFlexible().candidateClassId ?: return
|
||||
|
||||
Reference in New Issue
Block a user