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

Unified 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, 6 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: dart/sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
index 8f9b9cb7981677a4107bd314a32d0c91cc3b1bf0..9368f89b78795300d2c5a32589128409d46e88c7 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -433,13 +433,17 @@ Error: "#{value}" is not a valid Symbol name because is not:
* a qualified non-private identifier followed by "." and a user-defined operator.''');
static const AMBIGUOUS_REEXPORT = const MessageKind(
- 'Info: "#{element}" is (re)exported by multiple libraries.');
+ 'Info: "#{element}" is (re)exported by multiple libraries.');
static const AMBIGUOUS_LOCATION = const MessageKind(
- 'Info: "#{element}" is defined here.');
+ 'Info: "#{element}" is defined here.');
static const IMPORTED_HERE = const MessageKind(
- 'Info: "#{element}" is imported here.');
+ 'Info: "#{element}" is imported here.');
+
+ static const OVERRIDE_EQUALS_NOT_HASH_CODE = const MessageKind(
+ 'Warning: The class "#{class}" overrides "operator==", '
+ 'but not "get hashCode".');
static const COMPILER_CRASHED = const MessageKind(
"Error: The compiler crashed when compiling this element.");

Powered by Google App Engine
This is Rietveld 408576698