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); |
+ } |
} |