This little program will segfault the compiler (Xcode 7 beta 6):
let a = [1, 2, 3]
let b = a.map { $0 % 2 == 0 ? $0 : nil }
print(b)Helping it with the type inference makes it compile and work as expected:
let a = [1, 2, 3]
let b : [Int?] = a.map { $0 % 2 == 0 ? $0 : nil }
print(b)#22555889