Super call enforcement

I have adjusted the implementation to incorporate some feedback:

  1. 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.
  2. I have added the ability to specify a message on the @requiresSuper attribute, which will be shown along with the missing 'super' call diagnostic, as suggested by @rlziii.
  3. The @requiresSuper attribute 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 a final class.

A macOS and Linux toolchain is now available for testing purposes.

3 Likes