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

Unified Diff: utils/pub/yaml/model.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: utils/pub/yaml/model.dart
diff --git a/utils/pub/yaml/model.dart b/utils/pub/yaml/model.dart
index 1247a715b6f26939bf7a21b148167c0bdd68f13c..4304f7c08c17860d5d1f200eedfbc2a22fc8b33b 100644
--- a/utils/pub/yaml/model.dart
+++ b/utils/pub/yaml/model.dart
@@ -46,7 +46,7 @@ class _Tag {
}
}
- int hashCode() => name.hashCode();
+ int get hashCode => name.hashCode;
}
/** The abstract class for YAML nodes. */
@@ -64,7 +64,7 @@ class _Node {
return tag == other.tag;
}
- int hashCode() => _hashCode([tag, anchor]);
+ int get hashCode => _hashCode([tag, anchor]);
abstract visit(_Visitor v);
}
@@ -90,7 +90,7 @@ class _SequenceNode extends _Node {
String toString() => '$tag [${Strings.join(content.map((e) => '$e'), ', ')}]';
- int hashCode() => super.hashCode() ^ _hashCode(content);
+ int get hashCode => super.hashCode ^ _hashCode(content);
visit(_Visitor v) => v.visitSequence(this);
}
@@ -201,7 +201,7 @@ class _ScalarNode extends _Node {
return '${Strings.join(prefix, '')}$str';
}
- int hashCode() => super.hashCode() ^ content.hashCode();
+ int get hashCode => super.hashCode ^ content.hashCode;
visit(_Visitor v) => v.visitScalar(this);
}
@@ -232,7 +232,7 @@ class _MappingNode extends _Node {
return '$tag {$strContent}';
}
- int hashCode() => super.hashCode() ^ _hashCode(content);
+ int get hashCode => super.hashCode ^ _hashCode(content);
visit(_Visitor v) => v.visitMapping(this);
}

Powered by Google App Engine
This is Rietveld 408576698