Index: pkg/meta/lib/meta.dart |
diff --git a/pkg/meta/lib/meta.dart b/pkg/meta/lib/meta.dart |
index 3a26bc461a243146003dd5e31048cc0effee8665..5474b6e0e1a228d3bfeaa76bc009f047f5525e15 100644 |
--- a/pkg/meta/lib/meta.dart |
+++ b/pkg/meta/lib/meta.dart |
@@ -21,3 +21,20 @@ |
* in the language tour. |
*/ |
library meta; |
+ |
+/** |
+ * Used to annotate an instance method `m` in a class `C`. 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 |
+ * 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`. |
+ */ |
Bob Nystrom
2016/02/17 19:35:07
I understand if analyzer uses /** */ for historica
pquitslund
2016/02/17 19:35:51
Any chance we can jump to the future and adopt `//
Brian Wilkerson
2016/02/17 20:53:19
As much as I prefer "/**" style comments, I was re
|
+const _Protected protected = const _Protected(); |
+ |
+class _Protected { |
+ const _Protected(); |
+} |