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

Unified Diff: frog/type.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/type.dart
diff --git a/frog/type.dart b/frog/type.dart
index 44af7f5764fe3a9f9c652132c9b7bb87d76a7f24..2fe237bdcfee064e1e850063fbfda9ecb8f96fa7 100644
--- a/frog/type.dart
+++ b/frog/type.dart
@@ -41,6 +41,7 @@ class Type extends Element {
abstract Map<String, MethodMember> get constructors();
abstract addDirectSubtype(Type type);
abstract bool get isClass();
+ abstract Library get library();
Set<Type> get subtypes() => null;
// TODO(jmesserly): rename to isDynamic?
@@ -377,6 +378,15 @@ class Type extends Element {
return false;
}
+ int hashCode() {
+ var libraryCode = library == null ? 1 : library.hashCode();
+ var nameCode = name == null ? 1 : name.hashCode();
+ return (libraryCode << 4) ^ nameCode;
+ }
+
+ bool operator ==(other) =>
+ other is Type && other.name == name && library == other.library;
+
/**
* A function type (T1,...,Tn, [Tx1 x1,..., Txk xk]) -> T is a subtype of the
* function type (S1,...,Sn, [Sy1 y1,..., Sym ym]) -> S, if all of the

Powered by Google App Engine
This is Rietveld 408576698