<div dir="ltr"><span style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Hi!</span><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">I’m developing SDK for iOS, written purely in Swift - and I wonder is there a way to use something similar to inheritdoc like in Java? Possible use case: documentation stored in protocol which later on will be accessible in objects confronting protocol:</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">protocol test {</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">/**</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">It does the magic! Loren ipsum, long description. Whatever</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">*/</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">func magic() -> Int</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">}</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">class TestClass: test {</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class="" style="white-space:pre">        </span>/**</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class="" style="white-space:pre">                </span>@inherticdoc? instead of pasting protocol documentation</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class="" style="white-space:pre">        </span>*/</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class="" style="white-space:pre">        </span>public fund magic() -> Int {</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class="" style="white-space:pre">                </span>return 21</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><span class="" style="white-space:pre">        </span>}</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">}</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">so when calling</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">let x = TestClass()</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">x.magic() </div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">in quick help I would see „It does the magic! (…)” - without tedious copy&paste and managing in many places.</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Default behavior looks to omit it all along.</div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px"><br></div><div style="color:rgb(0,0,0);font-family:Helvetica;font-size:12px">Best regards.</div><div class="gmail_signature"><div dir="ltr">
</div></div>
</div>