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

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

Issue 10829365: Issue 4553. Any constant is valid for 'case'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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: 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 6fbff381c2c93949c1b1d02e41f7b41854d1a073..bd75aea4c041c023f826e851fc97420fdbb43a03 100644
--- a/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
+++ b/compiler/java/com/google/dart/compiler/resolver/TypeErrorCode.java
@@ -25,8 +25,8 @@ public enum TypeErrorCode implements ErrorCode {
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"),
- CASE_EXPRESSION_SHOULD_BE_INT_STRING(ErrorSeverity.ERROR,
- "Case expression should be compiler-time constant of type 'int' or 'String', '%s' found"),
+ CASE_EXPRESSION_TYPE_SHOULD_NOT_HAVE_EQUALS(ErrorSeverity.ERROR,
+ "Case expression type '%s' should not implement operator =="),
CASE_EXPRESSIONS_SHOULD_BE_SAME_TYPE(ErrorSeverity.ERROR,
"All case expressions should be compiler-time constants of the same type - 'int' or 'String'. '%s' expected but '%s' found"),
EXPECTED_POSITIONAL_ARGUMENT("Expected positional argument of type %s before named arguments"),

Powered by Google App Engine
This is Rietveld 408576698