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

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

Issue 21292003: Handle int/double case expression types correctly. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments Created 7 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: sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/sdk/lib/_internal/compiler/implementation/warnings.dart b/sdk/lib/_internal/compiler/implementation/warnings.dart
index afd38f4b389d5884f37c49cfa82045ecf0562704..87e27d77724bb6e3ef98f4d334d2dd49dfe13a43 100644
--- a/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -326,7 +326,10 @@ class MessageKind {
'Error: "default" only allowed on last case of a switch.');
static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind(
- 'Error: "case" expressions do not all have the same type.');
+ 'Error: "case" expressions do not all have type "#{type}".');
+
+ static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind(
+ 'Info: "case" expression of type "#{type}".');
static const MessageKind SWITCH_CASE_VALUE_OVERRIDES_EQUALS =
const MessageKind(
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/typechecker.dart ('k') | tests/compiler/dart2js/type_checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698