Skip to content

Commit f6cd8eb

Browse files
authored
Fix various bits in testing code to comply with new warnings (#3307)
* Fix various bits in testing code to comply with new warnings * try-again
1 parent ed56883 commit f6cd8eb

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

testing/test_package/lib/fake.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,7 @@ abstract class ImplementsFutureVoid implements Future<void> {}
465465

466466
/// This class takes a type, and it might be void.
467467
class ATypeTakingClass<T> {
468-
// ignore: missing_return
469-
T? aMethodMaybeReturningVoid() {}
468+
T? aMethodMaybeReturningVoid() => null;
470469
}
471470

472471
class ABaseClass {}
@@ -1041,7 +1040,7 @@ class OperatorReferenceClass {
10411040
OperatorReferenceClass();
10421041

10431042
@override
1044-
bool operator ==(dynamic other) {
1043+
bool operator ==(Object other) {
10451044
return false;
10461045
}
10471046
}
@@ -1283,7 +1282,7 @@ class FactoryConstructorThings {
12831282

12841283
DTypeParam?
12851284
aTopLevelTypeParameterFunction<DTypeParam extends TypeParameterThings>(
1286-
DTypeParam typedParam) {}
1285+
DTypeParam typedParam) => typedParam;
12871286

12881287
abstract class TypeParameterThings<ATypeParam,
12891288
BTypeParam extends FactoryConstructorThings> {

testing/test_package/lib/features/generalized_typedefs.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ T0 a;
2424
class C2 {
2525
T0 b;
2626
T1? c;
27-
T2? d(T3 e, T4 f) {}
27+
T2? d(T3 e, T4 f) => null;
2828
}
2929

3030
class C1<T extends T3> {

0 commit comments

Comments
 (0)