anchor.diff:    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 {
  
positive.code: 
    // "Left Nullable".
    if (_jsInstanceOf(t1, NullableType)) {
      // TODO(nshahan) Need to handle type variables.
      // https://github.com/dart-lang/sdk/issues/38816
      return _isSubtype(JS<NullableType>('!', '#', t1).type, t2, strictMode) &&
          _isSubtype(typeRep<Null>(), t2, strictMode);
    }
  
negative.code:     // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
      var t2TypeArg = JS('!', '#[0]', getGenericArgs(t2));
      var t2Future = JS('!', '#(#)', getGenericClassStatic<Future>(), t2TypeArg);
      return _isSubtype(t1, t2Future, strictMode) ||
          _isSubtype(t1, t2TypeArg, strictMode);
    }
  
    // "Right Nullable".
    if (_jsInstanceOf(t2, NullableType)) {
      return _isSubtype(t1, JS<NullableType>('!', '#', t2).type, strictMode) ||
          _isSubtype(t1, typeRep<Null>(), strictMode);
    }
  