Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(715)

Unified Diff: pkg/analyzer/test/generated/strong_mode_test.dart

Issue 2707263005: Add test for issue 28821 (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/test/generated/strong_mode_driver_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/strong_mode_test.dart
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
index 68b717018d223200af59fdc7ea710555418b2db1..ac834e6460a3b44a0ae208e41725c85702cc73cb 100644
--- a/pkg/analyzer/test/generated/strong_mode_test.dart
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -1172,22 +1172,22 @@ class StrongModeLocalInferenceTest extends ResolverTestCase {
_isFutureOf([_isObject])(invoke.staticType);
}
- test_futureOrNull_no_return_value() async {
+ test_futureOrNull_no_return() async {
MethodInvocation invoke = await _testFutureOr(r'''
FutureOr<T> mk<T>(Future<T> x) => x;
Future<int> f;
- test() => f.then<Null>((int x) {return;});
+ test() => f.then<Null>((int x) {});
''');
_isFunction2Of(_isInt, _isNull)(
invoke.argumentList.arguments[0].staticType);
_isFutureOfNull(invoke.staticType);
}
- test_futureOrNull_no_return() async {
+ test_futureOrNull_no_return_value() async {
MethodInvocation invoke = await _testFutureOr(r'''
FutureOr<T> mk<T>(Future<T> x) => x;
Future<int> f;
- test() => f.then<Null>((int x) {});
+ test() => f.then<Null>((int x) {return;});
''');
_isFunction2Of(_isInt, _isNull)(
invoke.argumentList.arguments[0].staticType);
@@ -2661,6 +2661,22 @@ class D extends C {
''');
}
+ test_genericMethod_override_covariant_field() async {
+ Source source = addSource(r'''
+abstract class A {
+ num get x;
+ set x(covariant num);
+}
+
+class B extends A {
+ int x;
+}
+''');
+ await computeAnalysisResult(source);
+ assertNoErrors(source);
+ verify([source]);
+ }
+
test_genericMethod_override_invalidReturnType() async {
Source source = addSource(r'''
class C {
« no previous file with comments | « pkg/analyzer/test/generated/strong_mode_driver_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698