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

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: 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 d93f4aa51a6a9c3c792981202300734c9d2523ee..5221ccd9a0d0d6774bcefab90371c74ae5b66fe8 100644
--- a/frog/member.dart
+++ b/frog/member.dart
@@ -196,7 +196,14 @@ class Member extends Element {
}
}
- int hashCode() => (declaringType.hashCode() << 4) ^ name.hashCode();
+ int hashCode() =>
Bob Nystrom 2011/12/06 23:11:23 I respect your desire to use =>, but this is a bit
nweiz 2011/12/07 19:26:56 Done.
+ ((declaringType == null ? 1 : declaringType.hashCode()) << 4) ^
+ (isConstructor ? constructorName.hashCode() : name.hashCode());
+
+ bool operator ==(other) => other is Member &&
Bob Nystrom 2011/12/06 23:11:23 This too. :)
nweiz 2011/12/07 19:26:56 Done, although it's still just one expression.
+ isConstructor == other.isConstructor &&
+ declaringType == other.declaringType && (isConstructor ?
+ constructorName == other.constructorName : name == other.name);
}

Powered by Google App Engine
This is Rietveld 408576698