@swift-ci please smoke test
@DougGregor could you take a quick look? Note that I had to add the new Self: Hashable
constraint on the extension; otherwise the _hash(into:)
definition clashed with its default implementation.
LGTM. Can you add a test for the issue it resolves?
@airspeedswift PR #15939 includes an update to the test suite's checkHashable
to also verify hash(into:)
equivalency (among other things). This update will extend the scope of an existing test so that it will cover this issue. I expect to land that very soon.
@swift-ci please test and merge
Login to write a write a comment.
_SwiftNewtypeWrapper
forwarded hashValue to its rawValue, but it failed to do the same for_hash(into:)
, which resulted in the wrapper struct having subtly different hashing than the raw value.This violated an implicit invariant when dictionaries/sets of such types were bridged to Objective-C through
AnyHashable
, leading to nondeterministic but frequent crashes.rdar://problem/39398060
(cherry picked from commit 6c5a6a6)