@@ -17,7 +17,7 @@ import ASTBridging
1717/// members to the type (or extension) members that provide the functionality for the concrete type.
1818///
1919/// TODO: Ideally, `Conformance` should be an enum
20- public struct Conformance : CustomStringConvertible , NoReflectionChildren {
20+ public struct Conformance : CustomStringConvertible , Hashable , NoReflectionChildren {
2121 public let bridged : BridgedConformance
2222
2323 public init ( bridged: BridgedConformance ) {
@@ -28,6 +28,14 @@ public struct Conformance: CustomStringConvertible, NoReflectionChildren {
2828 return String ( taking: bridged. getDebugDescription ( ) )
2929 }
3030
31+ public func hash( into hasher: inout Hasher ) {
32+ hasher. combine ( bridged. opaqueValue)
33+ }
34+
35+ public static func == ( lhs: Conformance , rhs: Conformance ) -> Bool {
36+ lhs. bridged. opaqueValue == rhs. bridged. opaqueValue
37+ }
38+
3139 public var isConcrete : Bool { bridged. isConcrete ( ) }
3240
3341 public var isValid : Bool { bridged. isValid ( ) }
@@ -37,7 +45,7 @@ public struct Conformance: CustomStringConvertible, NoReflectionChildren {
3745 return Type ( bridged: bridged. getType ( ) )
3846 }
3947
40- public var proto : ProtocolDecl {
48+ public var `protocol` : ProtocolDecl {
4149 return bridged. getRequirement ( ) . getAs ( ProtocolDecl . self)
4250 }
4351 public var isSpecialized : Bool {
0 commit comments