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

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

Issue 15745013: Report parameters/arguments count mismatch (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 a1dedd7d041e0e72bf960a08fdfe59432901919d..4d59f09010a00f5f6903fe5585946ff6fcf6b7bc 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
@@ -164,6 +164,14 @@ public enum StaticWarningCode implements ErrorCode {
EQUAL_KEYS_IN_MAP("Keys in a map cannot be equal"),
/**
+ * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
+ *
+ * @param requiredCount the maximum number of positional arguments
+ * @param argumentCount the actual number of positional arguments given
+ */
+ EXTRA_POSITIONAL_ARGUMENTS("%s positional arguments expected, but %s found"),
jwren 2013/05/22 19:03:16 Numbers can be substituted with %d, instead of %s,
scheglov 2013/05/22 19:37:31 Done.
+
+ /**
* 7.6.1 Generative Constructors: An initializing formal has the form <i>this.id</i>. It is a
* static warning if the static type of <i>id</i> is not assignable to <i>T<sub>id</sub></i>.
*
@@ -340,6 +348,14 @@ public enum StaticWarningCode implements ErrorCode {
NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER_MULTIPLE("Missing inherited members"),
/**
+ * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
+ *
+ * @param requiredCount the expected number of required arguments
+ * @param argumentCount the actual number of positional arguments given
+ */
+ NOT_ENOUGH_REQUIRED_ARGUMENTS("%s required argument(s) expected, but only %s found"),
+
+ /**
* 12.31 Type Test: It is a static warning if <i>T</i> does not denote a type available in the
* current lexical scope.
*/
@@ -480,6 +496,15 @@ public enum StaticWarningCode implements ErrorCode {
UNDEFINED_OPERATOR("There is no such operator '%s' in '%s'"),
/**
+ * 12.14.2 Binding Actuals to Formals: Furthermore, each <i>q<sub>i</sub></i>, <i>1<=i<=l</i>,
+ * must have a corresponding named parameter in the set {<i>p<sub>n+1</sub></i> ...
+ * <i>p<sub>n+k</sub></i>} or a static warning occurs.
+ *
+ * @param name the name of the requested named parameter
+ */
+ UNDEFINED_NAMED_PARAMETER("The named parameter '%s' is not defined"),
+
+ /**
* 12.18 Assignment: It is as static warning if an assignment of the form <i>v = e</i> occurs
* inside a top level or static function (be it function, method, getter, or setter) or variable
* initializer and there is no declaration <i>d</i> with name <i>v=</i> in the lexical scope

Powered by Google App Engine
This is Rietveld 408576698