[FIR] Implement CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON diagnostic
This commit is contained in:
@@ -890,6 +890,19 @@ object PositioningStrategies {
|
||||
}
|
||||
}
|
||||
|
||||
val IMPORT_LAST_NAME: PositioningStrategy<PsiElement> = object : PositioningStrategy<PsiElement>() {
|
||||
override fun mark(element: PsiElement): List<TextRange> {
|
||||
if (element is KtImportDirective) {
|
||||
val importedReference = element.importedReference
|
||||
if (importedReference is KtDotQualifiedExpression) {
|
||||
importedReference.selectorExpression?.let { return super.mark(it) }
|
||||
}
|
||||
return super.mark(element.importedReference ?: element)
|
||||
}
|
||||
return super.mark(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
|
||||
|
||||
Reference in New Issue
Block a user