[swift-evolution] union types

Drew Crawford drew at sealedabstract.com
Fri Dec 11 21:48:14 CST 2015


> On Dec 11, 2015, at 9:01 PM, Joe Groff <jgroff at apple.com> wrote:
> 
> with its Product type generalized to Any. 


In the alternate example

protocol Factory {
    typealias Product: ProductProtocol
    func make() -> Product
    var description : String { get }
}

would it generalize to ProductProtocol (e.g. not Any)?

That is potentially a good solution, especially if compatible with existing Swift 3 work.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151211/becf92db/attachment.html>


More information about the swift-evolution mailing list