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

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: Update comments (according to my dictionary whitelist is a word). 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..506b5e157519593ddc7c7d9ad578a2f22ab4ee1e 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -412,10 +412,10 @@ Length: #{length}''');
" a class.");
static const STATIC_FUNCTION_BLOAT = const MessageKind(
- 'Warning: Using "#{class}.#{name}" may result in larger output.');
+ 'Hint: Using "#{class}.#{name}" may result in larger output.');
static const NON_CONST_BLOAT = const MessageKind('''
-Warning: Using "new #{name}" may result in larger output.
+Hint: Using "new #{name}" may result in larger output.
Use "const #{name}" if possible.''');
static const STRING_EXPECTED = const MessageKind(
@@ -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(
+ 'Hint: 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