Found today that Swift inferring type mistakenly insists collection is heterogeneous.

Swift insists collection is heterogeneous

But Swift is happy when type annotation is added.

But Swift is happy when type annotation is added

I guess this edge case or not handled at all or handled incorrectly in Swift compile type inference.

Another case when Swift compiler diagnostic is dummy: Swift cannot get that literal array is a collection.

Swift cannot get that literal array is a collection

One more example of useless Swift diagnostic.

Another case of senseless Swift diagnostic