anchor.diff:      );
     }
   
  +  void test_typeParameters_contravariant_different() {
  +    // class A<in T>
  +    var T = typeParameter('T', variance: Variance.contravariant);
  +    var A = class_(name: 'A', typeParameters: [T]);
  +
  +    // A<num>
  +    // A<int>
  +    var aNum = interfaceTypeStar(A, typeArguments: [numType]);
  +    var aInt = interfaceTypeStar(A, typeArguments: [intType]);
  +
  +    _checkLeastUpperBound(aInt, aNum, aInt);
  +  }
  +
  +  void test_typeParameters_contravariant_same() {
  +    // class A<in T>
  +    var T = typeParameter('T', variance: Variance.contravariant);
  +    var A = class_(name: 'A', typeParameters: [T]);
  +
  +    // A<num>
  +    var aNum = interfaceTypeStar(A, typeArguments: [numType]);
  +
  +    _checkLeastUpperBound(aNum, aNum, aNum);
  +  }
  +
  +  void test_typeParameters_covariant_different() {
  +    // class A<out T>
  +    var T = typeParameter('T', variance: Variance.covariant);
  +    var A = class_(name: 'A', typeParameters: [T]);
  +
  +    // A<num>
  +    // A<int>
  +    var aNum = interfaceTypeStar(A, typeArguments: [numType]);
  +    var aInt = interfaceTypeStar(A, typeArguments: [intType]);
  +
  +    _checkLeastUpperBound(aInt, aNum, aNum);
  +  }
  +
  +  void test_typeParameters_covariant_same() {
  +    // class A<out T>
  +    var T = typeParameter('T', variance: Variance.covariant);
  +    var A = class_(name: 'A', typeParameters: [T]);
  +
  +    // A<num>
  +    var aNum = interfaceTypeStar(A, typeArguments: [numType]);
  +
  +    _checkLeastUpperBound(aNum, aNum, aNum);
  +  }
  +
     /// Check least upper bound of the same class with different type parameters.
     void test_typeParameters_different() {
       // class List<int>
  
positive.code:     var listOfDoubleType = listType(doubleType);
      var listOfNum = listType(numType);
      _checkLeastUpperBound(listOfIntType, listOfDoubleType, listOfNum);
    }
  
    void test_typeParameters_same() {
  
negative.code:     );
    }
  
    void test_typeParameters_different() {
      // GLB(List<int>, List<double>) = ⊥
      var listOfIntType = listType(intType);
      var listOfDoubleType = listType(doubleType);
      // TODO(rnystrom): Can we do something better here?
      _checkGreatestLowerBound(listOfIntType, listOfDoubleType, neverStar);
    }
  
    void test_typeParameters_same() {
  