Re: [swift-users] Error creating empty array of chained associated type

2017-04-29 Thread Martin R via swift-users
That seems to be a known problem: https://bugs.swift.org/browse/SR-773 > On 29. Apr 2017, at 22:38, Nevin Brackett-Rozinsky via swift-users > wrote: > > I’ve stumbled upon an odd situation where Swift gives a compiler error if I > do things directly, bu

[swift-users] Error creating empty array of chained associated type

2017-04-29 Thread Nevin Brackett-Rozinsky via swift-users
I’ve stumbled upon an odd situation where Swift gives a compiler error if I do things directly, but works properly with no error if I first create a typealias. Here is a stripped-down example: protocol P { associatedtype C: Collection } extension P { func emptyArray() -> [C.Iterator.Eleme