|
|
Previous ID |
SR-10858 |
Radar |
None |
Original Reporter |
@Catfish-Man |
Type |
Improvement |
Status |
In Progress |
Resolution |
|
Additional Detail from JIRA
|
|
Votes |
1 |
Component/s |
Standard Library |
Labels |
Improvement, StarterBug |
Assignee |
valeriyvan (JIRA) |
Priority |
Medium |
md5: d18df56f9579713f39cb8ff948cf30ca
Issue Description:
Currently we have code like this:
// String and NSString have different concepts of equality, so
// string-keyed NSDictionaries may generate key collisions when bridged
// over to Swift. See rdar://problem/35995647
let handleDuplicates = (Key.self == String.self)
result = Dictionary(_unsafeUninitializedCapacity: numElems,
allowingDuplicates: handleDuplicates) { keys, vals in
This is overly conservative. We only actually need to set allowingDuplicates
if there are non-NFC NSStrings!