anchor.diff:  /// nodes, have legacy types, and asserts that the legacy types are deep legacy
   /// types.
   class LegacyTypeAsserter extends GeneralizingAstVisitor {
  -  // TODO(mfairhurst): remove custom equality/hashCode once both use nullability
  -  Set<DartType> visitedTypes = LinkedHashSet<DartType>(
  -      equals: (a, b) =>
  -          a == b &&
  -          (a as TypeImpl).nullabilitySuffix ==
  -              (b as TypeImpl).nullabilitySuffix,
  -      hashCode: (a) =>
  -          a.hashCode * 11 + (a as TypeImpl).nullabilitySuffix.hashCode);
  +  Set<DartType> _visitedTypes = {};
   
     LegacyTypeAsserter({bool requireIsDebug = true}) {
       if (requireIsDebug) {
  
positive.code:       return;
      }
  
      if (visitedTypes.contains(type)) {
        return;
      }
  
      visitedTypes.add(type);
  
      if (type is TypeParameterType) {
        _assertLegacyType(type.bound);
  
negative.code:   }
  
    @override
    visitExpression(Expression node) {
      _assertLegacyType(node.staticType);
      _assertLegacyType(node.staticParameterElement?.type);
      super.visitExpression(node);
    }
  
    @override
  