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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 2346143003: fix #27363, support `@checked` on fields (Closed)
Patch Set: Created 4 years, 3 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/lib/src/dart/element/element.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/src/task/strong/checker_test.dart
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index 920a2bba4de0f74cd4e9f9ee19161d127771f2f2..e647d641107432af6d547cd42d5b40d9a65e1f3d 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -532,6 +532,20 @@ class G_error extends E implements D {
''');
}
+ void test_covariantOverride_fields() {
+ _addMetaLibrary();
+ checkFile(r'''
+import 'meta.dart';
+class A {
+ get foo => '';
+ set foo(_) {}
+}
+class B extends A {
+ @checked int foo;
+}
+ ''');
+ }
+
void test_covariantOverride_leastUpperBound() {
_addMetaLibrary();
checkFile(r'''
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698