You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[5.0][Foundation] Update hashing for bridged NSError protocols (#21205)
* [Foundation] Update hashing for bridged Error/NSError types
Protocols in resilient libraries that wish to provide a default implementation of hashing need to do so by providing a hash(into:) implementation.
hashValue has been deprecated as a Hashable requirement in SE-0206. Implementing only it in a protocol extension curses conforming types to get deprecation warnings by default.
(cherry picked from commit bbaec3d)
* [Foundation] _Bridged[Stored]NSError: Remove explicit impls for hashValue/_rawHashValue
The compiler-synthesized / stdlib-provided default implementations seem perfectly fine for these.
(cherry picked from commit 21d31ea)
* [Foundation] CocoaError.Code, URLError.Code: Remove hashValue implementation
These implementations did not produce the same hash values as the raw value. RawRepresentable provides a correct hashing implementation by default, so let’s just use that.
(cherry picked from commit 23188af)
0 commit comments