[swift-evolution] Will existentials ever conform to their protocols?

Anton Zhilin antonyzhilin at gmail.com
Wed Jan 18 02:10:39 CST 2017


There is also a caveat with static members:

protocol P {
    static func foo()
}

struct S : P {
    static func foo() { }
}

func bar<T: P>(x: T) {
    T.foo()
}

let p = S() as P
bar(p)  // P.foo() does not exist

​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170118/27ea4a73/attachment.html>


More information about the swift-evolution mailing list