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

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

Issue 15797007: Report CompileTimeErrorCode for 'const' argument 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
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
index f089c49e9372554144d03f0b4b67048f323b637a..536722237f696a8a9356cb783cbdd7428c0e98dc 100644
--- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
+++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/error/CompileTimeErrorCode.java
@@ -340,6 +340,17 @@ public enum CompileTimeErrorCode implements ErrorCode {
EXTENDS_DISALLOWED_CLASS("Classes cannot extend '%s'"),
/**
+ * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
+ * <p>
+ * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
+ * uncaught exception being thrown.
+ *
+ * @param requiredCount the maximum number of positional arguments
+ * @param argumentCount the actual number of positional arguments given
+ */
+ EXTRA_POSITIONAL_ARGUMENTS("%d positional arguments expected, but %d found"),
+
+ /**
* 12.2 Null: It is a compile-time error for a class to attempt to extend or implement Null.
* <p>
* 12.3 Numbers: It is a compile-time error for a class to attempt to extend or implement int.
@@ -811,6 +822,17 @@ public enum CompileTimeErrorCode implements ErrorCode {
"Initializer expressions in constant constructors must be constants"),
/**
+ * 12.14.2 Binding Actuals to Formals: It is a static warning if <i>m < h</i> or if <i>m > n</i>.
+ * <p>
+ * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
+ * uncaught exception being thrown.
+ *
+ * @param requiredCount the expected number of required arguments
+ * @param argumentCount the actual number of positional arguments given
+ */
+ NOT_ENOUGH_REQUIRED_ARGUMENTS("%d required argument(s) expected, but only %d found"),
Brian Wilkerson 2013/05/29 21:36:33 nit: The message will read better when there are n
scheglov 2013/05/30 01:23:53 Fixed here and in SWC.
+
+ /**
* 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the superinitializer appears
* and let <i>S</i> be the superclass of <i>C</i>. Let <i>k</i> be a generative constructor. It is
* a compile-time error if class <i>S</i> does not declare a generative constructor named <i>S</i>
@@ -999,6 +1021,18 @@ public enum CompileTimeErrorCode implements ErrorCode {
UNINITIALIZED_FINAL_FIELD(""),
/**
+ * 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.
+ * <p>
+ * 12.11.2 Const: It is a compile-time error if evaluation of a constant object results in an
+ * uncaught exception being thrown.
+ *
+ * @param name the name of the requested named parameter
+ */
+ UNDEFINED_NAMED_PARAMETER("The named parameter '%s' is not defined"),
+
+ /**
* 14.2 Exports: It is a compile-time error if the compilation unit found at the specified URI is
* not a library declaration.
* <p>
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/ElementResolver.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698