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

Unified Diff: runtime/lib/date.dart

Issue 10391109: Add Hashable to Date interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
« no previous file with comments | « lib/compiler/implementation/lib/mockimpl.dart ('k') | tests/corelib/date_time2_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/date.dart
diff --git a/runtime/lib/date.dart b/runtime/lib/date.dart
index 6b89dfd70d5d329a8324cc258ea7e6c3e03a0abd..bdbffc3104cbb5dfa6603aab75156da2500ffb7b 100644
--- a/runtime/lib/date.dart
+++ b/runtime/lib/date.dart
@@ -122,9 +122,8 @@ class DateImplementation implements Date {
return value == other.value && timeZone == other.timeZone;
}
- int compareTo(Date other) {
- return value.compareTo(other.value);
- }
+ int compareTo(Date other) => value.compareTo(other.value);
+ int hashCode() => value;
Date changeTimeZone(TimeZone targetTimeZone) {
if (targetTimeZone === null) {
« no previous file with comments | « lib/compiler/implementation/lib/mockimpl.dart ('k') | tests/corelib/date_time2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698