anchor.diff:      return currentType;
     }
   
  +  @override
  +  DartType resolveToBound(DartType type) {
  +    return instantiateToBounds(type);
  +  }
  +
     /**
      * Tries to promote from the first type from the second type, and returns the
      * promoted type if it succeeds, otherwise null.
  
positive.code:    * bound in a type system specific manner.
     */
    DartType _interfaceLeastUpperBound(InterfaceType type1, InterfaceType type2);
  
    /**
     * Given two [DartType]s [type1] and [type2] at least one of which is a
  
negative.code:    * The provider of types for the system
     */
    TypeProvider get typeProvider;
  
    @override
    DartType flatten(DartType type) {
      if (type is InterfaceType) {
        // Implement the cases:
        //  - "If T = FutureOr<S> then flatten(T) = S."
        //  - "If T = Future<S> then flatten(T) = S."
        if (type.isDartAsyncFutureOr || type.isDartAsyncFuture) {
          return type.typeArguments.isNotEmpty
              ? type.typeArguments[0]
              : DynamicTypeImpl.instance;
        }
        // Implement the case: "Otherwise if T <: Future then let S be a type
        // such that T << Future<S> and for all R, if T << Future<R> then S << R.
        // Then flatten(T) = S."
        //
        // In other words, given the set of all types R such that T << Future<R>,
        // let S be the most specific of those types, if any such S exists.
        //
        // Since we only care about the most specific type, it is sufficient to
        // look at the types appearing as a parameter to Future in the type
        // hierarchy of T.  We don't need to consider the supertypes of those
        // types, since they are by definition less specific.
        List<DartType> candidateTypes =
            _searchTypeHierarchyForFutureTypeParameters(type);
        DartType flattenResult =
            InterfaceTypeImpl.findMostSpecificType(candidateTypes, this);
        if (flattenResult != null) {
          return flattenResult;
        }
      }
      // Implement the case: "In any other circumstance, flatten(T) = T."
      return type;
    }
  
    List<InterfaceType> gatherMixinSupertypeConstraintsForInference(
        ClassElement mixinElement) {
  