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

Unified Diff: compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java

Issue 9270016: Issue 932. Checks for various named arguments cases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweaks for comments, changes in tests. Created 8 years, 11 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: compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
diff --git a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
index 24324da94d01b6765e4dc0c064c9a40781ce7e01..cb076249980ec42646b308f845f52294f5c0ed7a 100644
--- a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
@@ -18,6 +18,7 @@ public enum TypeErrorCode implements ErrorCode {
CANNOT_OVERRIDE_METHOD_NOT_SUBTYPE("cannot override %s of %s because %s is not a subtype of %s"),
DEFAULT_CONSTRUCTOR_TYPES(
"Constructor '%s' in '%s' has parameters types (%s), doesn't match '%s' in '%s' with (%s)"),
+ DUPLICATE_NAMED_ARGUMENT("Named parameter argument already provided as positional argument"),
EXTRA_ARGUMENT("extra argument"),
FOR_IN_WITH_ITERATOR_FIELD("iterator is a field, expected an iterator() method"),
FOR_IN_WITH_INVALID_ITERATOR_RETURN_TYPE("iterator method's return type is not assignable to %s"),
@@ -33,6 +34,7 @@ public enum TypeErrorCode implements ErrorCode {
MEMBER_IS_A_CONSTRUCTOR("%s is a constructor in %s"),
MISSING_ARGUMENT("missing argument of type %s"),
MISSING_RETURN_VALUE("no return value; expected a value of type %s"),
+ NO_SUCH_NAMED_PARAMETER("no such named parameter \"%s\" defined"),
NO_SUCH_TYPE("no such type \"%s\""),
NOT_A_FUNCTION("\"%s\" is not a function"),
NOT_A_MEMBER_OF("\"%s\" is not a member of %s"),

Powered by Google App Engine
This is Rietveld 408576698