> 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()
> }
>
>
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
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
> 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
> 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
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