<div dir="ltr"><div>Hello All,<br><br><br>I would like to suggest an enhancement for the swift protocol would really like this feature to be reviewed.<br><br></div>Enhancement Description : <br><div><br>Currently it is not possible to invoke the default implementation of a particular protocol (EG: SampleProtocolParent achieved using
protocol extension) inside another protocol extention(Eg: SampleProtocolSub) that inherits from the
former protocol. Please look into the SampleProtocolSub extension as shown below. Also the same behavior is observed while a class implements the protocol(Please look into the Test class that implements SampleProtocolSub as shown below ). <br><br> This behavior is something similar to the usage of
super keyword while overriding a method. <br><br>protocol SampleProtocolParent{<br> func testFunction();<br> <br>}<br>extension SampleProtocolParent{<br> func testFunction(){<br> print("hello my super implementation")<br> }<br><br>}<br>protocol SampleProtocolSub:SampleProtocolParent{<br> <br> <br>}<br><br>extension SampleProtocolSub{<br> func testFunction(){<br>
/* need to call testFunction implementation of the parent
SampleProtocolParent as well here. Is this a possible feature ?*/<br> print("hello my current and new implementation")<br> }<br> <br>}<br><br>class Test:SampleProtocolSub{<br> func testFunction(){<br> <br> /* need to call testFunction implmentaion of the parent SampleProtocolParent as well here. Is this a possible feature ?*/<br> print("hello my current and new new new implementaion")<br> }<br>}<br clear="all"><div><div><div><div dir="ltr"><br>Thanks,<br>Sreejith K R<br><a href="http://www.linkedin.com/groups/Kony-Developers-Group-4981807?trk=my_groups-b-grp-v" target="_blank">KonyDeveloperGroup</a><br><a href="http://http//ultimatemobiledev.blogspot.in" target="_blank">Mobile Dev Blog</a><br><a href="http://in.linkedin.com/in/sreejithrajendran/" target="_blank">Linkedin</a></div></div></div>
</div></div></div>