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

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

Issue 17588005: Warn about overriding operator== but not hashCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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 class MessageKind { 7 class MessageKind {
8 final String template; 8 final String template;
9 const MessageKind(this.template); 9 const MessageKind(this.template);
10 10
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 '"_".'); 426 '"_".');
427 427
428 static const INVALID_SYMBOL = const MessageKind(''' 428 static const INVALID_SYMBOL = const MessageKind('''
429 Error: "#{value}" is not a valid Symbol name because is not: 429 Error: "#{value}" is not a valid Symbol name because is not:
430 * an empty String, 430 * an empty String,
431 * a user defined operator, 431 * a user defined operator,
432 * a qualified non-private identifier optionally followed by "=", or 432 * a qualified non-private identifier optionally followed by "=", or
433 * a qualified non-private identifier followed by "." and a user-defined operato r.'''); 433 * a qualified non-private identifier followed by "." and a user-defined operato r.''');
434 434
435 static const AMBIGUOUS_REEXPORT = const MessageKind( 435 static const AMBIGUOUS_REEXPORT = const MessageKind(
436 'Info: "#{element}" is (re)exported by multiple libraries.'); 436 'Info: "#{element}" is (re)exported by multiple libraries.');
437 437
438 static const AMBIGUOUS_LOCATION = const MessageKind( 438 static const AMBIGUOUS_LOCATION = const MessageKind(
439 'Info: "#{element}" is defined here.'); 439 'Info: "#{element}" is defined here.');
440 440
441 static const IMPORTED_HERE = const MessageKind( 441 static const IMPORTED_HERE = const MessageKind(
442 'Info: "#{element}" is imported here.'); 442 'Info: "#{element}" is imported here.');
443
444 static const OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind(
445 'Warning: The class "#{class}" overrides "operator==", '
446 'but not "get hashCode".');
443 447
444 static const COMPILER_CRASHED = const MessageKind( 448 static const COMPILER_CRASHED = const MessageKind(
445 "Error: The compiler crashed when compiling this element."); 449 "Error: The compiler crashed when compiling this element.");
446 450
447 static const PLEASE_REPORT_THE_CRASH = const MessageKind(''' 451 static const PLEASE_REPORT_THE_CRASH = const MessageKind('''
448 The compiler is broken. 452 The compiler is broken.
449 453
450 When compiling the above element, the compiler crashed. It is not 454 When compiling the above element, the compiler crashed. It is not
451 possible to tell if this is caused by a problem in your program or 455 possible to tell if this is caused by a problem in your program or
452 not. Regardless, the compiler should not crash. 456 not. Regardless, the compiler should not crash.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 633
630 class CompileTimeConstantError extends Diagnostic { 634 class CompileTimeConstantError extends Diagnostic {
631 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}]) 635 CompileTimeConstantError(MessageKind kind, [Map arguments = const {}])
632 : super(kind, arguments); 636 : super(kind, arguments);
633 } 637 }
634 638
635 class CompilationError extends Diagnostic { 639 class CompilationError extends Diagnostic {
636 CompilationError(MessageKind kind, [Map arguments = const {}]) 640 CompilationError(MessageKind kind, [Map arguments = const {}])
637 : super(kind, arguments); 641 : super(kind, arguments);
638 } 642 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698