Xcode 6.2: String literals cannot parse inside swift string interpolation
| Originator: | segiddins | ||
| Number: | rdar://20383920 | Date Originated: | 01-Apr-2015 09:54 AM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | Xcode 6.2 (6C131e) |
| Classification: | Serious Bug | Reproducible: | Always |
Summary: The swift parser fails to parse a string that uses a string interpolation segment that contains a string literal (in the form of a “ character) Steps to Reproduce: Attempt to compile the following swift code: let property = "property" let ascending = false let string = "SortDescriptor (property: \(property), direction: \(ascending ? "ascending" : "descending"))" Expected Results: string == “SortDescriptor (property: property, direction: descending)” Actual Results: Error: Unexpected ‘“‘ character in string interpolation Regression: This error occurs in both Swift 1.1 and 1.2
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!