> On Sep 27, 2016, at 03:37, Vladimir.S via swift-users <[email protected]> > 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 _______________________________________________ swift-users mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-users
