Added assert clarification for EA-66572

This commit is contained in:
Evgeny Gerashchenko
2015-04-08 19:21:23 +03:00
parent 4ba0d2aba5
commit 8ef2718e30
@@ -166,6 +166,7 @@ public class UnusedSymbolInspection : AbstractKotlinInspection() {
var zeroOccurrences = true
for (name in listOf(declaration.getName()) + declaration.getAccessorNames() + declaration.getClassNameForCompanionObject().singletonOrEmptyList()) {
assert(name != null) { "Name is null for " + JetPsiUtil.getElementTextWithContext(declaration) }
when (psiSearchHelper.isCheapEnoughToSearch(name, useScope, null, null)) {
ZERO_OCCURRENCES -> {} // go on, check other names
FEW_OCCURRENCES -> zeroOccurrences = false