Fix newly introduced NPE in UnusedSymbolInspection
getName() and getNameIdentifier() are not in sync for class objects
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user