Xcode hangs on "Compiling Swift source files"
I made a class extend itself. That also causes Swift compiler to get stuck in a loop without error:
class X: X
Thanks for all commentors' suggestions. I narrowed it down to a map
's closure referencing a property that I had removed. Example:
var people: [Person] = ...
let foo = people.map { "\($0.name), \($0.age)" }
where Person
looks something like:
protocol Person {
var name: String { get }
var age: Int { get }
}
This all works fine. Then I removed age
while keeping the closure unchanged. This caused Xcode to become hopelessly confused. Probably related to the Swift's type inference.