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

Robert Widmann devteam.codafi at gmail.com
Wed Dec 6 11:54:18 CST 2017


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 at 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 at swift.org
> https://lists.swift.org/mailman/listinfo/swift-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20171206/10f47d8a/attachment.html>


More information about the swift-dev mailing list