anchor.diff:      ]);
     }
   }
  +
  +@reflectiveTest
  +class InvalidAssignmentWithoutNullSafetyTest extends PubPackageResolutionTest
  +    with InvalidAssignmentTestCases, WithoutNullSafetyMixin {
  +  test_ifNullAssignment() async {
  +    await assertErrorsInCode('''
  +void f(int i) {
  +  double d;
  +  d ??= i;
  +}
  +''', [
  +      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 36, 1),
  +    ]);
  +  }
  +
  +  test_ifNullAssignment_sameType() async {
  +    await assertNoErrorsInCode('''
  +void f(int i) {
  +  int j;
  +  j ??= i;
  +}
  +''');
  +  }
  +
  +  test_ifNullAssignment_superType() async {
  +    await assertNoErrorsInCode('''
  +void f(int i) {
  +  num n;
  +  n ??= i;
  +}
  +''');
  +  }
  +
  +  test_typeParameter() async {
  +    // https://github.com/dart-lang/sdk/issues/14221
  +    await assertErrorsInCode(r'''
  +class B<T> {
  +  T value;
  +  void test(num n) {
  +    value = n;
  +  }
  +}
  +''', [
  +      error(CompileTimeErrorCode.INVALID_ASSIGNMENT, 57, 1),
  +    ]);
  +  }
  +}
  
positive.code:   }
  }
  
  @reflectiveTest
  class InvalidAssignmentTest extends PubPackageResolutionTest
      with WithoutNullSafetyMixin {
    test_assignment_to_dynamic() async {
      await assertErrorsInCode(r'''
  f() {
  
negative.code:     ]);
    }
  
    test_typeParameter() async {
      // https://github.com/dart-lang/sdk/issues/14221
      await assertErrorsInCode(r'''
  class B<T> {
  