Skip to content

Commit 22294f2

Browse files
committed
Foundation: Provide a Hashable.hashValue witness for _BridgedStoredNSError conformers
Previously we would synthesize this in Sema, but this no longer works when conformance checking is triggered by SILGen.
1 parent 66a925c commit 22294f2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Darwin/Foundation-swiftoverlay/NSError.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,10 @@ extension _BridgedStoredNSError {
489489
public func hash(into hasher: inout Hasher) {
490490
hasher.combine(_nsError)
491491
}
492+
493+
@_alwaysEmitIntoClient public var hashValue: Int {
494+
return _nsError.hashValue
495+
}
492496
}
493497

494498
/// Describes the code of an error.

0 commit comments

Comments
 (0)