Swift Compiler: Concatenation of multiple Strings with Integers cannot be parsed in reasonable time
| Originator: | alex | ||
| Number: | rdar://22877285 | Date Originated: | 28-Sep-2015 01:18 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 7.0 (7A218) and 7.1 beta (7B75) |
| Classification: | UI/Usability | Reproducible: | Always |
Summary: When trying to concatenate three Strings and Integers three or more times, the compiler will fail to parse the expression, because the "Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions". Instead an error message should be shown to indicate that Strings and Integers cannot be concatenated because + is not defined for String and Integer as arguments Steps to Reproduce: Try to compile the sample project Expected Results: The compiler should return an error that "Binary operator '+' cannot be applied to operands of type 'String' and 'Int'" Actual Results: You get an error message saying: "Expression was too complex to be solved in reasonable time; consider breaking up the expression into distinct sub-expressions" Version: Xcode 7.0 (7A218) and 7.1 beta (7B75) Notes: Configuration: Attachments: 'SampleProject.zip' was successfully uploaded. The sample project contains the following file: let conversation: Int = 5 let pollOption: Int = 4 let user: Int = 2 let url = "/conversations/" + conversation + "/pollOptions/" + pollOption + "/votes/" + user
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!