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

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

See Conditional Conformances via Protocol Extensions <https://github.com/apple/swift/blob/master/docs/GenericsManifesto.md#conditional-conformances-via-protocol-extensions>.

ยทยทยท

On Dec 6, 2017, at 11:05 AM, Cao, Jiannan via swift-dev <swift-dev@swift.org> wrote:

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

_______________________________________________
swift-dev mailing list
swift-dev@swift.org
https://lists.swift.org/mailman/listinfo/swift-dev