Skip to content

Conversation

@lorentey
Copy link
Member

@lorentey lorentey commented Aug 2, 2018

NSLocale inherits hash from NSObject, but overrides isEqual(_:) to compare contents. The default hash uses object identity, so two NSLocale instances that compare equal under isEqual(_:) can produce non-equal hash values. This also breaks hashing for Locale, which calls into NSLocale.hash.

Add an implementation for NSLocale.hash that matches isEqual(_:).

Resolves https://bugs.swift.org/browse/SR-8448

@lorentey lorentey requested review from millenomi and parkera August 2, 2018 14:03
@lorentey
Copy link
Member Author

lorentey commented Aug 2, 2018

@swift-ci test

@millenomi
Copy link
Contributor

@swift-ci please test and merge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants