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

Unified Diff: pkg/analyzer/lib/src/generated/error.dart

Issue 1723243002: Validation of `@protected` method invocations. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: pkg/analyzer/lib/src/generated/error.dart
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 446ca5978a4fea6827cfd109569c1b4cca4f3d85..7c9206b6c399b64cf919cb7a2df85493d6b8d8b5 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3533,6 +3533,18 @@ class HintCode extends ErrorCode {
"A value of type '{0}' cannot be assigned to a variable of type '{1}'");
/**
+ * This hint is generated anywhere where a member annotated with `@protected`
+ * is used outside an instance member of a subclass.
+ *
+ * Parameters:
+ * 0: the name of the member
+ * 1: the name of the defining class
+ */
+ static const HintCode INVALID_USE_OF_PROTECTED_MEMBER = const HintCode(
+ 'INVALID_USE_OF_PROTECTED_MEMBER',
+ "The member '{0}' can only be used within instance members of subclasses of '{1}'");
+
+ /**
* Generate a hint for methods or functions that have a return type, but do
* not have a non-void return statement on all branches. At the end of methods
* or functions with no return, Dart implicitly returns `null`, avoiding these

Powered by Google App Engine
This is Rietveld 408576698