Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 74bf8c9

Browse files
committed
1 parent 832e71d commit 74bf8c9

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

pkg/analyzer/test/generated/strong_mode_driver_test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ class StrongModeStaticTypeAnalyzer2Test_Driver
5656
return super.test_genericMethod_functionInvocation_inferred();
5757
}
5858

59+
@failingTest
60+
@override
61+
test_genericMethod_override_covariant_field() async {
62+
return super.test_genericMethod_override_covariant_field();
63+
}
64+
5965
@failingTest
6066
@override
6167
test_genericMethod_tearoff() {

pkg/analyzer/test/generated/strong_mode_test.dart

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,22 +1172,22 @@ class StrongModeLocalInferenceTest extends ResolverTestCase {
11721172
_isFutureOf([_isObject])(invoke.staticType);
11731173
}
11741174

1175-
test_futureOrNull_no_return_value() async {
1175+
test_futureOrNull_no_return() async {
11761176
MethodInvocation invoke = await _testFutureOr(r'''
11771177
FutureOr<T> mk<T>(Future<T> x) => x;
11781178
Future<int> f;
1179-
test() => f.then<Null>((int x) {return;});
1179+
test() => f.then<Null>((int x) {});
11801180
''');
11811181
_isFunction2Of(_isInt, _isNull)(
11821182
invoke.argumentList.arguments[0].staticType);
11831183
_isFutureOfNull(invoke.staticType);
11841184
}
11851185

1186-
test_futureOrNull_no_return() async {
1186+
test_futureOrNull_no_return_value() async {
11871187
MethodInvocation invoke = await _testFutureOr(r'''
11881188
FutureOr<T> mk<T>(Future<T> x) => x;
11891189
Future<int> f;
1190-
test() => f.then<Null>((int x) {});
1190+
test() => f.then<Null>((int x) {return;});
11911191
''');
11921192
_isFunction2Of(_isInt, _isNull)(
11931193
invoke.argumentList.arguments[0].staticType);
@@ -2661,6 +2661,22 @@ class D extends C {
26612661
''');
26622662
}
26632663

2664+
test_genericMethod_override_covariant_field() async {
2665+
Source source = addSource(r'''
2666+
abstract class A {
2667+
num get x;
2668+
set x(covariant num);
2669+
}
2670+
2671+
class B extends A {
2672+
int x;
2673+
}
2674+
''');
2675+
await computeAnalysisResult(source);
2676+
assertNoErrors(source);
2677+
verify([source]);
2678+
}
2679+
26642680
test_genericMethod_override_invalidReturnType() async {
26652681
Source source = addSource(r'''
26662682
class C {

0 commit comments

Comments
 (0)