<div dir="ltr"><div>Some class based libraries/frameworks expect the consumer to subclass certain classes and override specific method and require that the super implementation of an overridden method is being called.</div><div><br></div><div>Not calling the super implementation is a common source of bugs that may be prevented if the compiler checks if super is called, like it does in some cases of init().</div><div><br></div><div>Example:<br></div><div><br></div><div>class Box {</div><div>   @requires_super<br></div><div>    func addStuff() { ... }</div><div>}<br></div><div><br></div><div>Overriding class Box&#39;s addStuff without calling super.addStuff() should result in an error</div><div><br></div><div>class Chest : Box {</div><div>    override addStuff() {<br></div><div>         // ERROR: addStuff() requires call to super.addStuff()</div><div>        ...</div><div>    }</div><div>}<br></div><div><br></div><div>Objective-C developers know this as NS_REQUIRES_SUPER and I think its worth thinking about adapting it.</div><div><div><br></div><div>I hope my proposal was clear and thanks for reading,</div><div><br></div></div><div>Gottfried</div></div>