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
[ClangImporter] Don’t import Array/Dictionary as such in Hashable contexts yet
Array and Dictionary are now conditionally Hashable, so the importer wants to use them when importing NSArray and NSDictionary types in hashable contexts. Unfortunately, this currently means that a type like
NSSet<NSDictionary<NSString *, id> *> *
gets imported as
Set<Dictionary<String, Any>>,
which is invalid — Dictionary.Value needs to be Hashable, too:
Set<Dictionary<String, AnyHashable>>
For now, work around this by explicitly turning NSArray and NSDictionary into AnyHashable when they are used as the first type parameter of NSSet or NSDictionary, ignoring Hashable conformance in this case. This reverts to the previous behavior.
0 commit comments