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

Unified Diff: pkg/meta/lib/meta.dart

Issue 1879853002: Annotation for `@optionalTypeArgs` (linter#196). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/meta/lib/meta.dart
diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart
index 16411b5def992b9c278a7e8a2e3ed2de5a38ab50..d089aa48faea9f2816c2b68936be8665971fbff3 100644
--- a/pkg/meta/lib/meta.dart
+++ b/pkg/meta/lib/meta.dart
@@ -56,6 +56,12 @@ const _Literal literal = const _Literal();
/// without invoking the overridden method.
const _MustCallSuper mustCallSuper = const _MustCallSuper();
+/// Used to annotate a class declaration `c`. Indicates that any type arguments
Brian Wilkerson 2016/04/11 23:51:24 nit: class names are typically capitalized
pquitslund 2016/04/11 23:58:21 Fixed!
+/// declared on `c` are to be treated as optional. Tools such as the analyzer
+/// and linter can use this information to suppress warnings that would
+/// otherwise require type arguments to be provided for instances of `c`.
+const _OptionalTypeArgs optionalTypeArgs = const _OptionalTypeArgs();
+
/// Used to annotate an instance member (method, getter, setter, operator, or
/// field) `m` in a class `C`. If the annotation is on a field it applies to the
/// getter, and setter if appropriate, that are induced by the field. Indicates
@@ -117,6 +123,10 @@ class _MustCallSuper {
const _MustCallSuper();
}
+class _OptionalTypeArgs {
+ const _OptionalTypeArgs();
+}
+
class _Protected {
const _Protected();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698