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
Compilation error with multiple bounds and package protected abstract method #656
Comments
|
This is a pretty interesting bug. If in package1, one were to declare a class that extends MyAbstract and implements MyInterface javac will also complain: and rightfully so. In this case you don't need the implements clause also to trigger the error. Basically In Package1, you can't declare a type that will extend MyAbstract because that class declares an abstract package private method which is invisible in Package1 But the crucial question is whether there can be a type variable T declared in Package1 that can extend MyAbstract. This is certainly legal (so ECJ is wrong to complain) - since T can be instantiated with a type declared in Package2 that extends MyAbstract properly |
|
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=519245 for pretty much the same problem |
For the code below Eclipse on master reports error on
MyGenericClass(project set to use Java 17 JLS).Javac from Java 17.0.4 accepts the code.
Initially reported at eclipse-platform/.github#85
The text was updated successfully, but these errors were encountered: