Int64 is not implicitly converted to NSNumber like Int is
| Originator: | paulb | ||
| Number: | rdar://22920517 | Date Originated: | 9/30/2015 |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7 |
| Classification: | Reproducible: | Always |
Summary: I want to be able to use Int64 where necessary and have it be as easy to use as using Int is. It's my understanding that Int is implicitly converted to an NSNumber when necessary by the compiler. Steps to Reproduce: 1. Make a dictionary var like [String: AnyObject] 2. Try to add an Int value to the dictionary 3. Try to add an Int64 value to the dictionary Expected Results: Step 2 should succeed Step 3 should succeed Actual Results: Step 2 succeeds Step 3 fails :( Version: Xcode 7 Notes: I have mostly noticed this with Int64 but the problem may exist with other types that I haven't noticed yet. Really all the numeric types should work the same nice way that Int does.
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!