@@ -17,7 +17,7 @@ import ASTBridging
17
17
/// members to the type (or extension) members that provide the functionality for the concrete type.
18
18
///
19
19
/// TODO: Ideally, `Conformance` should be an enum
20
- public struct Conformance : CustomStringConvertible , NoReflectionChildren {
20
+ public struct Conformance : CustomStringConvertible , Hashable , NoReflectionChildren {
21
21
public let bridged : BridgedConformance
22
22
23
23
public init ( bridged: BridgedConformance ) {
@@ -28,6 +28,14 @@ public struct Conformance: CustomStringConvertible, NoReflectionChildren {
28
28
return String ( taking: bridged. getDebugDescription ( ) )
29
29
}
30
30
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
+
31
39
public var isConcrete : Bool { bridged. isConcrete ( ) }
32
40
33
41
public var isValid : Bool { bridged. isValid ( ) }
@@ -37,7 +45,7 @@ public struct Conformance: CustomStringConvertible, NoReflectionChildren {
37
45
return Type ( bridged: bridged. getType ( ) )
38
46
}
39
47
40
- public var proto : ProtocolDecl {
48
+ public var `protocol` : ProtocolDecl {
41
49
return bridged. getRequirement ( ) . getAs ( ProtocolDecl . self)
42
50
}
43
51
public var isSpecialized : Bool {
0 commit comments