Swift: comparison of nested arrays fails with overload error
| Originator: | jay | ||
| Number: | rdar://17552170 | Date Originated: | 7/3/2014 |
| Status: | Open | Resolved: | |
| Product: | Xcode | Product Version: | 8beta2 |
| Classification: | Reproducible: | Yes |
Jay Hayes03-Jul-2014 12:07 PM Summary: The comparison of equality between two multidimensional arrays results in an overload error for the equality operator. Since this comparison works for one dimensional arrays, I would expect it to work for multiple dimensions. Steps to Reproduce: 1. execute the following lines of code let left = [[1]], right = [[1]] left == right Expected Results: I would expect the result of such a comparison to be "true", because the result of a one dimensional array comparison is "true" (when assigned to constants). Actual Results: <REPL>:2:6: error: could not find an overload for '==' that accepts the supplied arguments left == right ~~~~~^~~~~~~~ Version: Xcode 6.0 Build version 6A216f ProductName: Mac OS X ProductVersion: 10.9.4 BuildVersion: 13E28 Swift version 1.0 (swift-600.0.34.4.8) Target: x86_64-apple-darwin13.3.0 Notes: Configuration: 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!