I have adjusted the implementation to incorporate some feedback:
- I have upgraded the warning to an error, because the attribute implies a strong requirement and hence an error is more suitable than a warning.
- I have added the ability to specify a message on the
@requiresSuperattribute, which will be shown along with the missing 'super' call diagnostic, as suggested by @rlziii. - The
@requiresSuperattribute will be implicitly inherited by any overrides of a function which has been annotated with that attribute (as suggested by @mayoff) according to the following rule:
(1) the override is not annotated with@ignoresSuper.
(2) the override is not in afinalclass.
A macOS and Linux toolchain is now available for testing purposes.