Skip to content

Commit 656680e

Browse files
committed
[tests] Dot shorthands: CFE has no warning for if-null tests.
These warnings are only produced on the analyzer. Removing the CFE expectation for this. Bug: #57038 Change-Id: I2eb22251a6247b633c0481ab6409723beb371a3d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417881 Reviewed-by: Erik Ernst <[email protected]>
1 parent 06a8802 commit 656680e

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

tests/language/dot_shorthands/constructor/constructor_if_null_error_test.dart

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,18 @@ void constructorClassTest() {
1515
ConstructorClass notNullable = .new(1) ?? ctor;
1616
// ^
1717
// [analyzer] unspecified
18-
// [cfe] unspecified
1918

2019
ConstructorClass notNullableRegular = .regular(1) ?? ctor;
2120
// ^
2221
// [analyzer] unspecified
23-
// [cfe] unspecified
2422

2523
ConstructorClass notNullableNamed = .named(x: 1) ?? ctor;
2624
// ^
2725
// [analyzer] unspecified
28-
// [cfe] unspecified
2926

3027
ConstructorClass notNullableOptional = .optional(1) ?? ctor;
3128
// ^
3229
// [analyzer] unspecified
33-
// [cfe] unspecified
3430
}
3531

3632
void constructorExtTest() {
@@ -40,20 +36,16 @@ void constructorExtTest() {
4036
ConstructorExt notNullableExt = .new(1) ?? ctorExt;
4137
// ^
4238
// [analyzer] unspecified
43-
// [cfe] unspecified
4439

4540
ConstructorExt notNullableRegularExt = .regular(1) ?? ctorExt;
4641
// ^
4742
// [analyzer] unspecified
48-
// [cfe] unspecified
4943

5044
ConstructorExt notNullableNamedExt = .named(x: 1) ?? ctorExt;
5145
// ^
5246
// [analyzer] unspecified
53-
// [cfe] unspecified
5447

5548
ConstructorExt notNullableOptionalExt = .optional(1) ?? ctorExt;
5649
// ^
5750
// [analyzer] unspecified
58-
// [cfe] unspecified
5951
}

tests/language/dot_shorthands/member/static_method_if_null_error_test.dart

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@ void memberTest() {
1515
StaticMember memberLocal = .member() ?? member;
1616
// ^
1717
// [analyzer] unspecified
18-
// [cfe] unspecified
1918

2019
StaticMember memberType = .memberType<String, int>("s") ?? member;
2120
// ^
2221
// [analyzer] unspecified
23-
// [cfe] unspecified
2422
}
2523

2624
void memberExtTest() {
@@ -30,10 +28,8 @@ void memberExtTest() {
3028
StaticMemberExt memberLocal = .member() ?? member;
3129
// ^
3230
// [analyzer] unspecified
33-
// [cfe] unspecified
3431

3532
StaticMemberExt memberType = .memberType<String, int>("s") ?? member;
3633
// ^
3734
// [analyzer] unspecified
38-
// [cfe] unspecified
3935
}

tests/language/dot_shorthands/simple/simple_identifier_if_null_error_test.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,12 @@ void test() {
1313
Color colorLocal = .blue ?? Color.red;
1414
// ^
1515
// [analyzer] unspecified
16-
// [cfe] unspecified
1716

1817
Integer integerLocal = .one ?? Integer.two;
1918
// ^
2019
// [analyzer] unspecified
21-
// [cfe] unspecified
2220

2321
IntegerMixin integerMixinLocal = .mixinOne ?? IntegerMixin.mixinTwo;
2422
// ^
2523
// [analyzer] unspecified
26-
// [cfe] unspecified
2724
}

0 commit comments

Comments
 (0)