Report EXPLICIT_DELEGATION_CALL_REQUIRED on relevant element
^KT-38959 Fixed
This commit is contained in:
committed by
Vladimir Dolzhenko
parent
7af564c9f2
commit
5eac949b43
@@ -274,6 +274,18 @@ abstract class BaseDiagnosticsTest : KotlinMultiFileTestWithJava<TestModule, Tes
|
||||
whatDiagnosticsToConsider.value(it.diagnostic)
|
||||
}
|
||||
|
||||
filteredDiagnostics.map { it.diagnostic }.forEach { diagnostic ->
|
||||
val diagnosticElementTextRange = diagnostic.psiElement.textRange
|
||||
diagnostic.textRanges.forEach {
|
||||
check(diagnosticElementTextRange.contains(it)) {
|
||||
"Annotation API violation:" +
|
||||
" diagnostic text range $it has to be in range of" +
|
||||
" diagnostic element ${diagnostic.psiElement} '${diagnostic.psiElement.text}'" +
|
||||
" (factory ${diagnostic.factory.name}): $diagnosticElementTextRange"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
actualDiagnostics.addAll(filteredDiagnostics)
|
||||
|
||||
val uncheckedDiagnostics = mutableListOf<PositionalTextDiagnostic>()
|
||||
|
||||
Reference in New Issue
Block a user