Constraining types to protocols

This feature does not exist--today, the right-hand side of a conformance requirement must name a concrete protocol, and not some other type parameter. It is mentioned as a future direction in the Generics Manifesto as "Generalized Supertype Constraints", amusingly under the heading "Minor extensions", but in reality this would require a complete overhaul of the generics model.

2 Likes