This code works fine:
let lines = ["one", "one", "two"]
let lineSet = lines
but while compiling this one:
let lines = ["one", "one", "two"]
let lineSet = Set(lines)
I'm getting:
Command failed due to signal: Segmentation fault: 11
I've got Xcode Version 9.0 (9A235). Is this is really a bug or am I just doing something wrong?
My workaround for now:
var lineSet = Set<String>()
let lines = ["one", "one", "two"]
lines.forEach { lineSet.insert($0) }