From 8ef2718e307867da6eea974a33b680bb2846513b Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Wed, 8 Apr 2015 19:21:23 +0300 Subject: [PATCH] Added assert clarification for EA-66572 --- .../jetbrains/kotlin/idea/inspections/UnusedSymbolInspection.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedSymbolInspection.kt b/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedSymbolInspection.kt index 124e385215b..9b67a93c2ae 100644 --- a/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedSymbolInspection.kt +++ b/idea/src/org/jetbrains/kotlin/idea/inspections/UnusedSymbolInspection.kt @@ -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