Crash when an NSDictionary<NSString *, NSError *> is attempted to bridge to Swift
Originator: | matos.xav | ||
Number: | rdar://39349762 | Date Originated: | April 11th, 2018 |
Status: | None | Resolved: | |
Product: | Developer Tools | Product Version: | Xcode Version 9.3 (9E145) |
Classification: | Crash | Reproducible: | Always |
Summary: When an Objective-C API uses an `NSDictionary<NSString *, NSError *> *` object either as a return type, parameter, or block parameter, the bridging that takes place to and from the Swift `Error` type will cause the app to crash. If an API simply uses `NSError *` type, the bridging produces useable objects both ways with no crashing. Steps to Reproduce: Use the attached project and run, you will get through the plain error tests but crash on any of the dictionary tests Expected Results: NSError bridging within a Dictionary should produce the same sort of objects we get from the plain error examples Actual Results: NSError bridging within a Dictionary crashes or produces objects which crash when accessing NSError properties such as domain and code. Version/Build: Xcode Version 9.3 (9E145)
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!
Project GitHub Repository
https://github.com/CalQL8ed-K-OS/NSError-Dictionary-Crash