[swift-evolution] [Pitch] allow non-nominal type extension
Cao Jiannan
frogcjn at 163.com
Thu Oct 20 22:30:28 CDT 2016
It is just same as current grammar:
extension TrackCountProvider where Self : PublishDateProvider { ... }
with a more logical format
extension TrackCountProvider & PublishDateProvider { ... }
> e.g.
>
> extensionTrackCountProvider&PublishDateProvider{
> vartrackCountAndPublishDateText:String{
> varinfos: [String] = []
>
> iflettrackCount = trackCount{
> infos.append("\(trackCount)")
>
> }
>
> ifletpublishDateText = publishDate?.text {
> infos.append(publishDateText)
> }
>
> returninfos.joined(separator: seperator)
> }
> }
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161021/f26f082e/attachment.html>
More information about the swift-evolution
mailing list