<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">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).<div class=""><br class=""></div><div class="">Slava</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jan 18, 2017, at 12:10 AM, Anton Zhilin via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important" class="">There is also a caveat with static members:</p>
<pre style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;font-size:1em;line-height:1.2em;margin:1.2em 0px" class=""><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline;white-space:pre;overflow:auto;border-radius:3px;border:1px solid rgb(204,204,204);padding:0.5em 0.7em;display:block!important" class="">protocol P {
    static func foo()
}

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

func bar&lt;T: P&gt;(x: T) {
    T.foo()
}

let p = S() as P
bar(p)  // P.foo() does not exist
</code></pre><div title="MDH:VGhlcmUgaXMgYWxzbyBhIGNhdmVhdCB3aXRoIHN0YXRpYyBtZW1iZXJzOjxicj48YnI+PGRpdj5g
YGA8L2Rpdj48ZGl2PnByb3RvY29sIFAgezwvZGl2PjxkaXY+Jm5ic3A7ICZuYnNwOyBzdGF0aWMg
ZnVuYyBmb28oKTwvZGl2PjxkaXY+fTwvZGl2PjxkaXY+PGJyPjwvZGl2PjxkaXY+c3RydWN0IFMg
OiBQIHs8L2Rpdj48ZGl2PiZuYnNwOyAmbmJzcDsgc3RhdGljIGZ1bmMgZm9vKCkgeyB9PC9kaXY+
PGRpdj59PC9kaXY+PGRpdj48YnI+PC9kaXY+PGRpdj5mdW5jIGJhciZsdDtUOiBQJmd0Oyh4OiBU
KSB7PC9kaXY+PGRpdj4mbmJzcDsgJm5ic3A7IFQuZm9vKCk8L2Rpdj48ZGl2Pn08L2Rpdj48ZGl2
Pjxicj48L2Rpdj48ZGl2PmxldCBwID0gUygpIGFzIFA8L2Rpdj48ZGl2PmJhcihwKSAmbmJzcDsv
LyBQLmZvbygpIGRvZXMgbm90IGV4aXN0PC9kaXY+PGRpdj5gYGA8L2Rpdj4=" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0" class="">​</div></div></div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></body></html>