[swift-evolution] PITCH: New :== operator for generic constraints

Daniel Resnick danielzresnick at gmail.com
Tue Aug 16 17:09:59 CDT 2016


It's weird to me that protocol-typed objects aren't seen as conforming to
that protocol. I would intuitively expect this function to work for both a
sequence of Pepper types and other types that conform to Pepper:
func pick<PepperType:Sequence>(peppers: PepperType) where
PepperType.Iterator.Element:
Pepper {
    // pick a peck of peppers
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160816/dd26745f/attachment.html>


More information about the swift-evolution mailing list