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

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

Issue 14592005: Report CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR (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/verifier/ErrorVerifier.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 6e7b596f3491896b20f2cc55fc50c000afe439b5..3b6e987f0c431a10b587e794d7a53c402048ff8a 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
@@ -881,8 +881,22 @@ public enum CompileTimeErrorCode implements ErrorCode {
* names: <, >, <=, >=, ==, +, /, ~/, *, %, |, ^, &, <<, >>, [] is not 1.
* It is a compile time error if the arity of the user-declared operator - is not 0 or 1. It is a
* compile time error if the arity of the user-declared operator ~ is not 0.
+ *
+ * @param operatorName the name of the declared operator
+ * @param expectedNumberOfParameters the number of parameters expected
+ * @param actualNumberOfParameters the number of parameters found in the operator declaration
+ */
+ WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR(
+ "Operator '%s' should declare exactly %d parameter(s), but %d found"),
+
+ /**
+ * 7.1.1 Operators: It is a compile time error if the arity of the user-declared operator - is not
+ * 0 or 1.
+ *
+ * @param actualNumberOfParameters the number of parameters found in the operator declaration
*/
- WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR(""),
+ WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS(
+ "Operator '-' should declare 0 or 1 parameter, but %d found"),
/**
* 7.3 Setters: It is a compile-time error if a setter's formal parameter list does not include
« no previous file with comments | « no previous file | editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/verifier/ErrorVerifier.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698