New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support for @override in class definition #9136
Comments
Would that mean that we have "hint" all overrides with |
In Java, if you tag with @OverRide then it is an error if it is not overriding something... But there is also a compiler warning you can enable for every overridden method that does not specify @OverRide. In other words you can optionally choose to be warned that you are unintentionally overriding I quite like this idea - so much so that for years I've tried to get into the habit of putting "@OverRide" in my method comments. It has most benefit when all your code complies but also back porting would be an effort; how about enabling the warning by package? |
so having When viewing the code I've found a lot of comments in front of methods |
adding this feature IMHO would also entail making the existing code base use it, but thinking perl it should actually not be that hard to write a script that adds the @OverRide hints to the existing source ... |
@hkollmann could you please modify your issue description and be more specific on what the use of the |
Another time |
But if this should react as it does in java: If And it would NOT help when unintentionally overriding a method. |
@level420 I think whether or not override is processed would be configurable. I guess it could be part of config.json ... |
In Java you can mark methods with the Annotation @OverRide to show that this method is overridden. The compiler gives a warning if you override a method without using @OverRide.
So you have a hint wich methods exists in the base class.
It would be helpfull if the qooxdoo generator could support this concept.
The text was updated successfully, but these errors were encountered: