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

Unified Diff: tests/language/savannah_test.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: tests/language/savannah_test.dart
diff --git a/tests/language/savannah_test.dart b/tests/language/savannah_test.dart
index ea553028384446fa331046982b517d86c8f78c3c..fea178e0a5cbdb4bd2e2472fec47dbb5aa0e740b 100644
--- a/tests/language/savannah_test.dart
+++ b/tests/language/savannah_test.dart
@@ -14,7 +14,7 @@ class Giraffe implements BigGame {
Giraffe(this.name) : identityHash_ = nextId() {}
- int hashCode() {
+ int get hashCode {
return identityHash_;
}
@@ -44,8 +44,8 @@ class SavannahTest {
Giraffe giraffe2 = new Giraffe("Rose");
savannah[giraffe1] = giraffe1.name;
savannah[giraffe2] = giraffe2.name;
- print("giraffe1 hash: ${giraffe1.hashCode()}");
- print("giraffe2 hash: ${giraffe2.hashCode()}");
+ print("giraffe1 hash: ${giraffe1.hashCode}");
+ print("giraffe2 hash: ${giraffe2.hashCode}");
var count = savannah.length;
print("getCount is $count");
@@ -60,8 +60,8 @@ class SavannahTest {
Zebra zebra2 = new Zebra("Zeeta");
savannah[zebra1] = zebra1.name;
savannah[zebra2] = zebra2.name;
- print("zebra1 hash: ${zebra1.hashCode()}");
- print("zebra2 hash: ${zebra2.hashCode()}");
+ print("zebra1 hash: ${zebra1.hashCode}");
+ print("zebra2 hash: ${zebra2.hashCode}");
count = savannah.length;
print("getCount is $count");

Powered by Google App Engine
This is Rietveld 408576698