anchor.diff:    // If t1 is a JS Object, we may not hit core.Object.
     if (t1 == null) {
       return _equalType(t2, Object) || _equalType(t2, dynamic);
  +  }
  +
  +  if (_jsInstanceOf(t1, TypeVariableForSubtype)) {
  +    if (_jsInstanceOf(t2, TypeVariableForSubtype)) {
  +      // Bounds were already checked to be subtypes of each other in the
  +      // generic function section of `_isSubtype()` so just check these type
  +      // variables share the same index in their respective signatures.
  +      return JS<TypeVariableForSubtype>('!', '#', t1).index ==
  +          JS<TypeVariableForSubtype>('!', '#', t2).index;
  +    }
  +
  +    // If t1 <: bound <: t2 then t1 <: t2.
  +    return _isSubtype(
  +        JS<TypeVariableForSubtype>('!', '#', t1).bound, t2, strictMode);
     }
   
     // Check if t1 and t2 have the same raw type.  If so, check covariance on
  
positive.code:     // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
      var t2TypeArg = JS('!', '#[0]', getGenericArgs(t2));
      var t2Future = JS('!', '#(#)', getGenericClassStatic<Future>(), t2TypeArg);
      // TODO(nshahan) Need to handle type variables on the left.
      // https://github.com/dart-lang/sdk/issues/38816
      return _isSubtype(t1, t2Future, strictMode) ||
          _isSubtype(t1, t2TypeArg, strictMode);
    }
  
    // "Right Nullable".
    if (_jsInstanceOf(t2, NullableType)) {
      // TODO(nshahan) Need to handle type variables.
      // https://github.com/dart-lang/sdk/issues/38816
      return _isSubtype(t1, JS<NullableType>('!', '#', t2).type, strictMode) ||
          _isSubtype(t1, typeRep<Null>(), strictMode);
    }
  
negative.code:   TypeVariable(this.name);
  
    toString() => name;
  }
  
  /// A helper data class for the subtype check algorithm to represent a generic
  /// function type variable with its bound.
  ///
  /// Instances of this class are created during subtype check operations to pass
  /// information deeper into the algorithm. They are not canonicalized and should
  /// be discarded after use.
  class TypeVariableForSubtype extends DartType {
    /// The position of this type variable in the type variable list of a generic
    /// function.
    final int index;
  
    /// The bound for this type variable.
    ///
    /// Only nullable to avoid the cost of a late field within the subtype check.
    /// Should not be null after initial creation algorithm is complete.
    DartType? bound;
  
    TypeVariableForSubtype(this.index);
  }
  
  class Variance {
  