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

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

Issue 1719353002: Define protected to apply to fields (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: additional changes Created 4 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 | « 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 a914ff65a6b239a24df6279cf5d02021272b2a12..694096842f918fbb5ea2ceb1865cf210dc3e95cd 100644
--- a/pkg/meta/lib/meta.dart
+++ b/pkg/meta/lib/meta.dart
@@ -18,15 +18,20 @@
/// in the language tour.
library meta;
-/// Used to annotate an instance method `m` in a class `C`. Indicates that `m`
+/// 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, implied by the field. Indicates that `m`
/// should only be invoked from instance methods of `C` or classes that extend
/// or mix in `C`, either directly or indirectly. Additionally indicates that
/// `m` should only be invoked on `this`, whether explicitly or implicitly.
///
/// Tools, such as the analyzer, can provide feedback if an invocation of a
-/// method marked as being protected is used outside of an instance method
+/// member marked as being protected is used outside of an instance member
/// defined on a class that extends or mixes in the class in which the protected
-/// method is defined, or that uses a receiver other than `this`.
+/// member is defined, or that uses a receiver other than `this`.
+///
+/// Tools can also provide feedback if the annotation is used on anything other
+/// than an instance member.
const _Protected protected = const _Protected();
class _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