Fix newly introduced NPE in UnusedSymbolInspection

getName() and getNameIdentifier() are not in sync for class objects
This commit is contained in:
Pavel V. Talanov
2015-01-28 14:26:32 +03:00
parent 1adf15d01d
commit d52d1035d0
@@ -98,7 +98,7 @@ public class UnusedSymbolInspection : AbstractKotlinInspection() {
if (!ProjectRootsUtil.isInProjectSource(declaration)) return
// Simple PSI-based checks
if (declaration.getName() == null) return
if (declaration.getNameIdentifier() == null) return
if (declaration is JetEnumEntry) return
if (declaration.hasModifier(JetTokens.OVERRIDE_KEYWORD)) return
if (declaration is JetProperty && declaration.isLocal()) return