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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 26978004: Emit a compile-time error when using doubles as switch case expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = ""; 7 const DONT_KNOW_HOW_TO_FIX = "";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 "Error: 'default' only allowed on last case of a switch."); 517 "Error: 'default' only allowed on last case of a switch.");
518 518
519 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind( 519 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL = const MessageKind(
520 "Error: 'case' expressions do not all have type '#{type}'."); 520 "Error: 'case' expressions do not all have type '#{type}'.");
521 521
522 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind( 522 static const MessageKind SWITCH_CASE_TYPES_NOT_EQUAL_CASE = const MessageKind(
523 "Info: 'case' expression of type '#{type}'."); 523 "Info: 'case' expression of type '#{type}'.");
524 524
525 static const MessageKind SWITCH_CASE_VALUE_OVERRIDES_EQUALS = 525 static const MessageKind SWITCH_CASE_VALUE_OVERRIDES_EQUALS =
526 const MessageKind( 526 const MessageKind(
527 "Error: 'case' expression value overrides 'operator=='."); 527 "Error: 'case' expression type overrides 'operator=='.");
528 528
529 static const MessageKind INVALID_ARGUMENT_AFTER_NAMED = const MessageKind( 529 static const MessageKind INVALID_ARGUMENT_AFTER_NAMED = const MessageKind(
530 "Error: Unnamed argument after named argument."); 530 "Error: Unnamed argument after named argument.");
531 531
532 static const MessageKind NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( 532 static const MessageKind NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
533 "Error: Not a compile-time constant."); 533 "Error: Not a compile-time constant.");
534 534
535 static const MessageKind CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind( 535 static const MessageKind CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind(
536 "Error: Cycle in the compile-time constant computation."); 536 "Error: Cycle in the compile-time constant computation.");
537 537
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
1430 1430
1431 class CompileTimeConstantError extends Diagnostic { 1431 class CompileTimeConstantError extends Diagnostic {
1432 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) 1432 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse)
1433 : super(kind, arguments, terse); 1433 : super(kind, arguments, terse);
1434 } 1434 }
1435 1435
1436 class CompilationError extends Diagnostic { 1436 class CompilationError extends Diagnostic {
1437 CompilationError(MessageKind kind, Map arguments, bool terse) 1437 CompilationError(MessageKind kind, Map arguments, bool terse)
1438 : super(kind, arguments, terse); 1438 : super(kind, arguments, terse);
1439 } 1439 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698