[swift-dev] [Questions][SE-143]Conditional conformances for protocols?

Cao, Jiannan frogcjn at 163.com
Wed Dec 6 10:04:35 CST 2017


Recently, we can use conditional conformances for struct/class.

> extension Array: Equatable where Self.Element : Equatable { ... }


Could we use conditional conformances for protocols?
For example:

> extension Collection : Equatable  where Self.Element : Equatable { ... }


Thanks!
Jiannan




More information about the swift-dev mailing list