The function foo<A: P>(x: A){} requires a type which conforms to protocol P.

An existential of protocol P does not actually conform to protocol P.
It’s always been a limitation in Swift:

If the function’s signature were foo(x: P){}, it would work.

Howard’s example swaps the protocol P for a concrete type (P1), which is what 
makes it work.

Guillaume Lessard

swift-users mailing list

Reply via email to