Swift: simple expression is "too complex to be solved"
| Originator: | garth | ||
| Number: | rdar://19676346 | Date Originated: | 31-Jan-2015 12:03 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.2b4 6C107a |
| Classification: | Serious Bug | Reproducible: | Always |
On my Mac Mini, the following Swift code yields the error shown:
let z = Array(0...4)
let two = 2
// "Expression was to complex to be solved in reasonable time"
let doesntWork = two * z[0] + two * z[1] + z[2] + z[3] + z[4]
I understand that the type solver is not optimized yet, but this expression is so type-constrained that I wonder if there isn’t an outright bug somewhere. All the variables are Ints, and all the subscripts have to be interpreted as Ints, so I’m not seeing any obvious places where a choice of interpretation must be made.
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!