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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/types/element_type_mask.dart

Issue 17569004: Implement hashCode on objects stored in a set or used as map keys. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased on CL 17588005. 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/types/element_type_mask.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/types/element_type_mask.dart b/dart/sdk/lib/_internal/compiler/implementation/types/element_type_mask.dart
index 0ebb9f0a885b10fad823e212451244e1d8993450..75e23452848070b4e6d88a752705ef580e915a15 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/types/element_type_mask.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/types/element_type_mask.dart
@@ -31,6 +31,8 @@ class ElementTypeMask extends ForwardingTypeMask {
return element == other.element && isNullable == other.isNullable;
}
+ int get hashCode => computeHashCode(element, isNullable);
+
bool equalsDisregardNull(other) {
if (other is! ElementTypeMask) return false;
return element == other.element;

Powered by Google App Engine
This is Rietveld 408576698