<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">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"><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">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">​</div></div></div>