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

Unified Diff: lib/compiler/implementation/warnings.dart

Issue 10916002: Change switch to give errors when cases don't follow the newest syntax. (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: lib/compiler/implementation/warnings.dart
diff --git a/lib/compiler/implementation/warnings.dart b/lib/compiler/implementation/warnings.dart
index 322de1d4e8ec40cd2e324c30caca4f44abcd9ad9..599b78a566647fc3ff189c7cc35955a21f40a241 100644
--- a/lib/compiler/implementation/warnings.dart
+++ b/lib/compiler/implementation/warnings.dart
@@ -130,11 +130,14 @@ class MessageKind {
'super not allowed here');
static const INVALID_CASE_DEFAULT = const MessageKind(
'default only allowed on last case of a switch');
- static const INVALID_CASE_EXPRESSION = const MessageKind(
- 'case expression is not a compile-time constant int or string.');
- static const INVALID_CASE_EXPRESSION_TYPE = const MessageKind(
- "case expressions don't all have the same type "
- "(must be all int or String).");
+
+ static const SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind(
+ "case expressions don't all have the same type.");
+ static const SWITCH_CASE_VALUE_OVERRIDES_EQUALS = const MessageKind(
+ "case expression value overrides 'operator=='.");
+ static const SWITCH_INVALID = const MessageKind(
+ "Switch cases contain invalid expressions.");
floitsch 2012/08/30 14:08:18 lowercase switch
Lasse Reichstein Nielsen 2012/09/03 09:12:56 Done.
+
static const INVALID_ARGUMENT_AFTER_NAMED = const MessageKind(
'non-named argument after named argument');
« lib/compiler/implementation/ssa/builder.dart ('K') | « lib/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698