<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">I’d even suggest to force <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">final</code> for such methods:</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 class="hljs language-swift" 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;display:block;overflow-x:auto;padding:0.5em;color:rgb(51,51,51);background:rgb(248,248,248)"><span class="hljs-class"><span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">protocol</span> <span class="hljs-title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(68,85,136);font-weight:bold">Fooable</span> </span>{ }

<span class="hljs-class"><span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">extension</span> <span class="hljs-title" style="color:rgb(153,0,0);font-weight:bold;color:rgb(68,85,136);font-weight:bold">Fooable</span> </span>{
<span class="hljs-comment" style="color:rgb(153,153,136);font-style:italic">//  func foo() { }        // error: must be declared as final</span>
    final <span class="hljs-func"><span class="hljs-keyword" style="color:rgb(51,51,51);font-weight:bold">func</span> <span class="hljs-title" style="color:rgb(153,0,0);font-weight:bold">foo</span><span class="hljs-params">()</span> </span>{ }  <span class="hljs-comment" style="color:rgb(153,153,136);font-style:italic">// ok</span>
}
</code></pre>
<div title="MDH:PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPkknZCBldmVuIHN1Z2dlc3QgdG8gZm9yY2UgYGZpbmFs
YCBmb3Igc3VjaCBtZXRob2RzOjwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj48YnI+PC9k
aXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPmBgYHN3aWZ0PC9kaXY+PGRpdiBjbGFzcz0iZ21h
aWxfZXh0cmEiPnByb3RvY29sIEZvb2FibGUgeyB9PC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0
cmEiPjxicj48L2Rpdj48ZGl2IGNsYXNzPSJnbWFpbF9leHRyYSI+ZXh0ZW5zaW9uIEZvb2FibGUg
ezwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj4vLyAmbmJzcDtmdW5jIGZvbygpIHsgfSAm
bmJzcDsgJm5ic3A7ICZuYnNwOyAmbmJzcDsvLyBlcnJvcjogbXVzdCBiZSBkZWNsYXJlZCBhcyBm
aW5hbDwvZGl2PjxkaXYgY2xhc3M9ImdtYWlsX2V4dHJhIj4mbmJzcDsgJm5ic3A7IGZpbmFsIGZ1
bmMgZm9vKCkgeyB9ICZuYnNwOy8vIG9rPC9kaXY+PGRpdiBjbGFzcz0iZ21haWxfZXh0cmEiPn08
L2Rpdj48ZGl2IGNsYXNzPSJnbWFpbF9leHRyYSI+YGBgPC9kaXY+" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0">​</div></div></div>