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

Unified Diff: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java

Issue 22339023: Fix for issue 11497- liberalize warnings about bad overrides (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks to the status files Created 7 years, 4 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: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
index 58be86f477a90fc6cf0ea55b529a6833cdcaa3b9..70877ae0dc66c962ee7607dc6a33412593e0f0a0 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/StaticWarningCode.java
@@ -372,6 +372,39 @@ public enum StaticWarningCode implements ErrorCode {
"Parameters cannot override default values, this method overrides '%s.%s' where this positional parameter has a different value"),
/**
+ * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an
+ * instance member <i>m2</i> and <i>m1</i> does not declare all the named parameters declared by
+ * <i>m2</i>.
+ *
+ * @param paramCount the number of named parameters in the overridden member
+ * @param className the name of the class from the overridden method
+ */
+ INVALID_OVERRIDE_NAMED(
+ "Missing the named parameter '%s' to match the overridden method from '%s'"),
+
+ /**
+ * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an
+ * instance member <i>m2</i> and <i>m1</i> has fewer optional positional parameters than
+ * <i>m2</i>.
+ *
+ * @param paramCount the number of positional parameters in the overridden member
+ * @param className the name of the class from the overridden method
+ */
+ INVALID_OVERRIDE_POSITIONAL(
+ "Must have at least %d optional parameters to match the overridden method from '%s'"),
+
+ /**
+ * 7.1 Instance Methods: It is a static warning if an instance method <i>m1</i> overrides an
+ * instance member <i>m2</i> and <i>m1</i> has a different number of required parameters than
+ * <i>m2</i>.
+ *
+ * @param paramCount the number of required parameters in the overridden member
+ * @param className the name of the class from the overridden method
+ */
+ INVALID_OVERRIDE_REQUIRED(
+ "Must have exactly %d required parameters to match the overridden method from '%s'"),
+
+ /**
* 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a setter <i>m2</i> and the
* type of <i>m1</i> is not a subtype of the type of <i>m2</i>.
*

Powered by Google App Engine
This is Rietveld 408576698