swiftlang / swift-corelibs-foundation

The Foundation Project, providing core utilities, internationalization, and OS independence
swift.org
Apache License 2.0
5.3k stars 1.14k forks source link

[SR-8450] swift-corelibs-foundation: URLComponents/NSURLComponents don't hash correctly #3652

Open lorentey opened 6 years ago

lorentey commented 6 years ago
Previous ID SR-8450
Radar None
Original Reporter @lorentey
Type Bug
Status In Progress
Resolution
Additional Detail from JIRA | | | |------------------|-----------------| |Votes | 0 | |Component/s | Foundation | |Labels | Bug | |Assignee | @lorentey | |Priority | Medium | md5: 8e7a4d82dac22ba67d2c23f61dae1d23

Issue Description:

NSURLComponents inherits hash from NSObject, but overrides isEqual: to compare contents. This also breaks hashing for URLComponents, which calls into NSURLComponents.hash.

lorentey commented 6 years ago

PR with fix is at https://github.com/apple/swift-corelibs-foundation/pull/1648