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

Unified Diff: runtime/lib/object_patch.dart

Issue 11191078: Make hashCode a getter and not a method. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file with co19 issue number. Created 8 years, 2 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: runtime/lib/object_patch.dart
diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart
index 9e1812b7730d653e397212f8d6275cb8fcd2f0a6..603e14e26c0213877cf1c1b3da3d47a7cd907f52 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -10,7 +10,7 @@ patch class Object {
static Expando _hashCodeExp = new Expando("Object.hashCode");
static Random _hashCodeRnd = new Random();
- /* patch */ int hashCode() {
+ /* patch */ int get hashCode {
var result = _hashCodeExp[this];
if (result == null) {
result = _hashCodeRnd.nextInt(0x40000000); // Stay in Smi range.

Powered by Google App Engine
This is Rietveld 408576698