Xcode-7.1 (7B75): Explicitly-sized Int types aren't convertible to AnyObject
| Originator: | jp | ||
| Number: | rdar://23172237 | Date Originated: | 19-Oct-2015 02:10 PM |
| Status: | Closed | Resolved: | 06-Dec-2016 02:53 PM |
| Product: | Developer Tools | Product Version: | Xcode-7.1 (7B75) |
| Classification: | Crash/Hang/Data Loss | Reproducible: | Always |
Summary: Int16, Int32, Int64 should all be convertible to AnyObject as NSNumbers. Steps to Reproduce: Int(0) as AnyObject // => 0 Int16(0) as? AnyObject // => nil Int32(0) as? AnyObject // => nil Int64(0) as? AnyObject // => nil Expected Results: Int16, Int32 and Int64 values should all be convertible to AnyObject as NSNumbers, just like Int values are. Actual Results: Int16, Int32 and Int64 values are not convertible to AnyObject. Regression: Describe circumstances where the problem occurs or does not occur, such as software versions and/or hardware configurations. Notes: Provide additional information, such as references to related problems, workarounds and relevant attachments.
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!
Resolved with SE-0139: https://github.com/apple/swift-evolution/blob/master/proposals/0139-bridge-nsnumber-and-nsvalue.md