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

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

Issue 2334413002: follow up for #25578, add `@checked` to package:meta (Closed)
Patch Set: fixed 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/meta/CHANGELOG.md ('k') | pkg/meta/pubspec.yaml » ('j') | 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 a9424f9536c996b1dc40ec1d261ea211d70f1ca3..633a4d362fb50fe80e1fd26023b6ad05b5db415b 100644
--- a/pkg/meta/lib/meta.dart
+++ b/pkg/meta/lib/meta.dart
@@ -128,6 +128,19 @@ class Required {
const Required([this.reason]);
}
+
+/// Used to annotate a parameter of an instance method that overrides another
+/// method.
+///
+/// Indicates that this parameter may have a tighter type than the parameter on
+/// its superclass. The actual argument will be checked at runtime to ensure it
+/// is a subtype of the overridden parameter type.
+const _Checked checked = const _Checked();
+
+class _Checked {
+ const _Checked();
+}
+
class _Factory {
const _Factory();
}
« no previous file with comments | « pkg/meta/CHANGELOG.md ('k') | pkg/meta/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698