[swift-users] xcode8 segmentation fault help

Jordan Rose jordan_rose at apple.com
Tue Sep 27 12:03:04 CDT 2016


> On Sep 27, 2016, at 03:37, Vladimir.S via swift-users <swift-users at swift.org> wrote:
> 
> On 27.09.2016 12:51, Luis Ferro via swift-users wrote:
>> let string = "a simple test"
>> if (string.characters.count > 0) {
>>    let words = string.components(separatedBy: " ")
>>    let headline = words.map { (var word) -> String in
>>        let firstCharacter = word.remove(at: word.startIndex)
>>        return "\(String(firstCharacter).uppercased())\(word)"
>>        }.joined(separator: " ")
>> }
> 
> Swift 3.0 does not support `var` in function/closure parameter list. For some reason Swift parser didn't catch this as syntax error, I'd suggest you to report a bug on bugs.swift.org.

This particular bug has been fixed already on the master branch of Swift, so no need to report it. :-)

Jordan



More information about the swift-users mailing list