anchor.diff:        }
   
         var constraints = _constraints[typeParam]!;
  -      if (partial) {
  +      var previouslyInferredType = _typesInferredSoFar[typeParam];
  +      if (previouslyInferredType != null) {
  +        inferredTypes[i] = previouslyInferredType;
  +      } else if (partial) {
           var inferredType = _inferTypeParameterFromContext(
               constraints, extendsClause,
               isContravariant: typeParam.variance.isContravariant);
           inferredTypes[i] = inferredType;
           if (typeParam.isLegacyCovariant &&
  -            UnknownInferredType.isKnown(inferredTypes[i])) {
  -          _fixedTypeParameters.add(typeParam);
  +            UnknownInferredType.isKnown(inferredType)) {
  +          _typesInferredSoFar[typeParam] = inferredType;
           }
         } else {
           inferredTypes[i] = _inferTypeParameterFromAll(
  
positive.code:   ///
    /// Downwards inference provisionally considers the list to be a `List<num>`.
    /// Without this heuristic, upwards inference would refine the type to
    /// `List<int>`, leading to a runtime failure.  So what we do is "fix" the
    /// type parameter to `num` after downwards inference, preventing upwards
    /// inference from doing any further refinement.
    ///
    /// (Note that the heuristic isn't needed for type parameters whose variance
    /// is explicitly specified using the as-yet-unreleased "variance" feature,
    /// since type parameters whose variance is explicitly specified don't undergo
    /// implicit runtime checks).
    final Set<TypeParameterElement> _fixedTypeParameters = {};
  
    GenericInferrer(this._typeSystem, this._typeFormals,
        {this.errorReporter,
  
negative.code:     if (success) {
        var constraints = gatherer.computeConstraints();
        for (var entry in constraints.entries) {
          if (!entry.value.isEmpty &&
              !_typesInferredSoFar.containsKey(entry.key)) {
            var constraint = _constraints[entry.key]!;
            constraint.add(
              _TypeConstraint(origin, entry.key,
  