Skip to content

Commit 8ef2718

Browse files
Evgeny GerashchenkoEvgeny Gerashchenko
authored andcommitted
Added assert clarification for EA-66572
1 parent 4ba0d2a commit 8ef2718

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

idea/src/org/jetbrains/kotlin/idea/inspections/UnusedSymbolInspection.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ public class UnusedSymbolInspection : AbstractKotlinInspection() {
166166
var zeroOccurrences = true
167167

168168
for (name in listOf(declaration.getName()) + declaration.getAccessorNames() + declaration.getClassNameForCompanionObject().singletonOrEmptyList()) {
169+
assert(name != null) { "Name is null for " + JetPsiUtil.getElementTextWithContext(declaration) }
169170
when (psiSearchHelper.isCheapEnoughToSearch(name, useScope, null, null)) {
170171
ZERO_OCCURRENCES -> {} // go on, check other names
171172
FEW_OCCURRENCES -> zeroOccurrences = false

0 commit comments

Comments
 (0)