Nil Coalesce Bug
| Originator: | an00na | ||
| Number: | rdar://20726808 | Date Originated: | 28-Apr-2015 09:21 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Swift 1.2 |
| Classification: | Other Bug | Reproducible: | Not Applicable |
Summary: let a = 1 a ?? nil // It should work but compiler reports error: binary operator '??' cannot be applied to operands of type 'Int' and 'nil' Steps to Reproduce: Compare line 17 and 23 of sample code. Sample code: http://cl.ly/1m1l3J3d3Z1v
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!