Do not report declaration clashes on MANY_IMPL_MEMBER_NOT_IMPLEMENTED

This commit is contained in:
Andrey Breslav
2014-06-19 14:03:06 +04:00
parent b076dc3b58
commit 86e8a1d410
@@ -73,7 +73,9 @@ public fun getJvmSignatureDiagnostics(element: PsiElement, otherDiagnostics: Dia
class FilteredJvmDiagnostics(val jvmDiagnostics: Diagnostics, val otherDiagnostics: Diagnostics) : Diagnostics by jvmDiagnostics {
private fun alreadyReported(psiElement: PsiElement): Boolean {
return otherDiagnostics.forElement(psiElement).any { it.getFactory() in setOf<DiagnosticFactory<*>>(CONFLICTING_OVERLOADS, REDECLARATION, NOTHING_TO_OVERRIDE) }
val higherPriority = setOf<DiagnosticFactory<*>>(
CONFLICTING_OVERLOADS, REDECLARATION, NOTHING_TO_OVERRIDE, MANY_IMPL_MEMBER_NOT_IMPLEMENTED)
return otherDiagnostics.forElement(psiElement).any { it.getFactory() in higherPriority }
|| psiElement is JetPropertyAccessor && alreadyReported(psiElement.getParent()!!)
}