| 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
|
|
|