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

Unified Diff: frog/member.dart

Issue 8771054: Add a script to generate HTML and DOM docs with cross-links to one another. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More code review changes. Created 9 years 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: frog/member.dart
diff --git a/frog/member.dart b/frog/member.dart
index 8697f56ecef9a18aa6a8ebd020ddd4392bfd57eb..4f971cbd9c6ed01937e3c3a8b9380b8b835ee399 100644
--- a/frog/member.dart
+++ b/frog/member.dart
@@ -197,7 +197,18 @@ class Member extends Element {
}
}
- int hashCode() => (declaringType.hashCode() << 4) ^ name.hashCode();
+ int hashCode() {
+ final typeCode = declaringType == null ? 1 : declaringType.hashCode();
+ final nameCode = isConstructor ? constructorName.hashCode() :
+ name.hashCode();
+ return (typeCode << 4) ^ nameCode;
+ }
+
+ bool operator ==(other) {
+ return other is Member && isConstructor == other.isConstructor &&
+ declaringType == other.declaringType && (isConstructor ?
+ constructorName == other.constructorName : name == other.name);
+ }
}
« client/html/scripts/html_diff.dart ('K') | « frog/library.dart ('k') | frog/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698