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
N4JS allows private abstract methods and forces overriding them in sub classes #1047
Comments
Interestingly, making virtual (i.e. overridable) methods private is a recommended practice for C++: https://stackoverflow.com/questions/2170688/private-virtual-method-in-c Not saying N4JS should have this, since it doesn't really make sense in a language that follows Java's footsteps. Just a point of interest. Furthermore, whoever fixes this should check why the access control test suite didn't catch this. It's possible that it's missing the case of overriding an abstract method. |
Also enabled existing tests for static abstract members. Cf. Req. IDE-46
Remark: added new constraint in spec (Req IDE-46). Did not remove consequential error in subtype overriding the "private abstract" method -- if you get that error, that means you have ignored the error in the super type. |
Since we allow access to private members from within the module, it is possible to implement an abstract method in a class defined in the same module. Therefor it is ok to not add an error. I created #1221 for redefining private member access. But even in this case it would be possible to override a private abstract method from a nested class (defined by means of class expressions). |
I think the quickfix does not make much sense, that's true. Again I think we should fix that in the context of #1221. |
* Private abstract members are allowed! * Also enabled existing tests for static abstract members.
N4JS allows private abstract methods and forces overriding them in sub classes
see error when
private abstract
is not overriddenThe text was updated successfully, but these errors were encountered: