NSHTTPURLResponse.allHeaderFields property type has no generic arguments, thus untyped [AnyHashable:Any] in Swift
Originator: | corrmage | ||
Number: | rdar://38706898 | Date Originated: | 21-Mar-2018 03:12 PM |
Status: | Open | Resolved: | |
Product: | iOS + SDK | Product Version: | 11.3 beta 4 |
Classification: | Enhancement | Reproducible: | Always |
Summary: The property is defined as `@property (readonly, copy) NSDictionary *allHeaderFields;` an thus seen as an [AnyHashable:Any] from Swift. The class however has an initialiser with headerFields property that is actually typed as `NSDictionary<NSString *, NSString *> *`. Steps to Reproduce: 1. Create or obtain an instance of HTTPURLResponse in Swift code 2. Try to access the contents of allHeaderFields property Expected Results: allHeaderFields is [String:String] Actual Results: allHeaderFields is [AnyHashable:Any] Version: 11.3 beta 4 Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!