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
This is a bit more difficult as it seems. While we can easily conform swift-corelibs-foundation types to _HasCustomAnyHashableRepresentation, it is currently pointless to do so, because such conformances have no effect unless the Objective-C runtime is present. (This seems like an artificial restriction to me, but I doubt I fully grok AnyHashable's runtime components yet.)
I believe AnyHashable should work the same way on all platforms; therefore, ideally we should implement support for _HCAHR everywhere.
I don't think we'd originally wanted to do that for AnyHashable (there was no need). Now that we're investigating bridging on Linux, that decision may change. cc @jckarter, @millenomi
The only thing that makes custom AnyHashable representations necessary is bridging, yeah. If we do bridging on Linux we'd need to implement this, but as it stands it's not needed.
Additional Detail from JIRA
md5: 4d3513cd1638ab2defe58f984baea9fe
Issue Description:
The open-source Foundation package currently doesn't define _HasCustomAnyHashableRepresentation conformances for the following types:
NSAffineTransform
NSArray
NSCalendar
NSCharacterSet
NSDate
NSDateComponents
NSDateInterval
NSDictionary
NSLocale
NSNotification
NSNumber
NSSet
NSString
NSTimeZone
NSURL
NSURLComponents
NSURLQueryItem
NSURLRequest
To improve consistency across platforms, we need to ensure these types hash the same way under AnyHashable as their corresponding Swift types.
The text was updated successfully, but these errors were encountered: