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

2017-01-18 Thread Joe Groff via swift-evolution
> On Jan 18, 2017, at 12:10 AM, Anton Zhilin via swift-evolution > wrote: > > There is also a caveat with static members: > > protocol P { > static func foo() > } > > struct S : P { > static func foo() { } > } > > func bar(x: T) { > T.foo() > } > >

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

2017-01-18 Thread Slava Pestov via swift-evolution
Yes, there’s already logic to detect and diagnose this case in fact (@objc protocols are self-conforming, except when they contain static members or initializers). Slava > On Jan 18, 2017, at 12:10 AM, Anton Zhilin via swift-evolution > wrote: > > There is also a

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

2017-01-18 Thread Anton Zhilin via swift-evolution
There is also a caveat with static members: protocol P { static func foo() } struct S : P { static func foo() { } } func bar(x: T) { T.foo() } let p = S() as P bar(p) // P.foo() does not exist ​ ___ swift-evolution mailing list

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

2017-01-17 Thread Slava Pestov via swift-evolution
> On Jan 17, 2017, at 9:33 PM, David Sweeris via swift-evolution > wrote: > > > On Jan 17, 2017, at 22:30, Braeden Profile via swift-evolution > > wrote: > >> Hello Swift Community! >> >> I know that

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

2017-01-17 Thread David Sweeris via swift-evolution
> On Jan 17, 2017, at 22:30, Braeden Profile via swift-evolution > wrote: > > Hello Swift Community! > > I know that I’ve seen this mentioned before, but what with Enhanced > Existentials being brought up, I think this is worth mentioning now. What is > the plan

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

2017-01-17 Thread Braeden Profile via swift-evolution
Hello Swift Community! I know that I’ve seen this mentioned before, but what with Enhanced Existentials being brought up, I think this is worth mentioning now. What is the plan regarding letting existentials conform to their protocols? Currently, in Swift 3, it is impossible to write code