anchor.diff:    }
   
     /// If [kind] is a named library, register it.
  -  /// TODO(scheglov) Use [LibraryFileStateKind]
  -  void add(FileStateKind? kind) {
  -    if (kind is LibraryFileStateKind) {
  -      final name = kind.name;
  -      if (name != null) {
  -        final libraries = _map[name] ??= [];
  -        libraries.add(kind);
  -      }
  +  void add(LibraryFileStateKind kind) {
  +    final name = kind.name;
  +    if (name != null) {
  +      final libraries = _map[name] ??= [];
  +      libraries.add(kind);
       }
     }
   
  
positive.code:         );
        }
      } else if (libraryDirective != null) {
        _kind = LibraryFileStateKind(
          file: this,
          name: libraryDirective.name,
        );
      } else if (partOfNameDirective != null) {
        _kind = PartOfNameFileStateKind(
          file: this,
  
negative.code:       );
      }
  
      _invalidatesLibrariesOfThisPart();
    }
  
  