ClassSymbolImpl extends SymbolImpl implements ClassSymbol { @Override public void removeUsages() { super.removeUsages(); superClasses.forEach(symbol -> ((SymbolImpl) symbol).removeUsages()); members.forEach(symbol -> ((SymbolImpl) symbol).removeUsages()); } ClassSymbolImpl(ClassDef classDef, @Nullable String fullyQualifiedName, PythonFile pythonFile);  ClassSymbolImpl(String name, @Nullable String fullyQualifiedName);  ClassSymbolImpl(String name, @Nullable String fullyQualifiedName, @Nullable LocationInFile definitionLocation,
                         boolean hasDecorators, boolean hasMetaClass, @Nullable String metaclassFQN); @Override List<Symbol> superClasses(); void addSuperClass(Symbol symbol); @Override boolean hasUnresolvedTypeHierarchy(); boolean hasUnresolvedTypeHierarchy(boolean includeAmbiguousSymbols); @Override Set<Symbol> declaredMembers(); @Override Optional<Symbol> resolveMember(String memberName); boolean hasMetaClass(); @Override boolean canHaveMember(String memberName); boolean hasSuperClassWithUnknownMetaClass(); @Override LocationInFile definitionLocation(); @Override boolean isOrExtends(String fullyQualifiedClassName); @Override boolean isOrExtends(ClassSymbol other); @Override boolean canBeOrExtend(String fullyQualifiedClassName); @Override boolean hasDecorators(); void addMembers(Collection<Symbol> members); void setHasSuperClassWithoutSymbol(); void setHasMetaClass(); void setMetaclassFQN(String metaclassFQN); @CheckForNull String metaclassFQN(); @Override void removeUsages();  }
@Test public void removeUsages() { FileInput fileInput = parse( "class Base: ...", "class A(Base):", " def meth(): ..." ); ClassDef classDef = PythonTestUtils.getLastDescendant(fileInput, tree -> tree.is(Tree.Kind.CLASSDEF)); ClassSymbol symbol = (ClassSymbol) classDef.name().symbol(); ((SymbolImpl) symbol).removeUsages(); assertThat(symbol.usages()).isEmpty(); assertThat(symbol.declaredMembers()).allMatch(member -> member.usages().isEmpty()); assertThat(symbol.superClasses()).allMatch(superClass -> superClass.usages().isEmpty()); }