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

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

Issue 1773803002: Validation of `@mustCallSuper` overrides. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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 8cb0a905906869ec2d6b3826f69df98ee00a84ac..2a6509c505d9ef45bfdc9d0e9d6196d65898cf4e 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -3567,6 +3567,18 @@ class HintCode extends ErrorCode {
"Either add a return statement or change the return type to 'void'");
/**
+ * Generate a hint for methods that override methods annotated `@mustCallSuper`
+ * that do not invoke the overridden super method.
+ *
+ * Parameters:
+ * 0: the name of the class declaring the overriden method
+ */
+ static const HintCode MUST_CALL_SUPER = const HintCode(
+ 'MUST_CALL_SUPER',
+ "This method overrides a method annotated as @mustCall super in '{0}', "
+ "but does invoke the overriden method");
+
+ /**
* A condition in a control flow statement could evaluate to `null` because it
* uses the null-aware '?.' operator.
*/

Powered by Google App Engine
This is Rietveld 408576698