We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The Eclipse Java compiler fails to compile the following Java code snippet:
public static Stream<Class<? extends Annotation>> function(Stream<Annotation> annotations) { return annotations.map(Annotation::annotationType).filter(a -> true); }
with the following error message
Type mismatch: cannot convert from Stream<Class<capture#31-of ? extends Annotation>> to Stream<Class<? extends Annotation>>
But javac compiles it successfully, in the Guice framework: https://github.com/google/guice/blob/654032a954d55a00fc5ee90da815da98cb6676a1/core/src/com/google/inject/spi/BindingSourceRestriction.java#L348-L350
When you check out the guice git-repository that leads to one error in the project.
The text was updated successfully, but these errors were encountered:
Which ECJ version?
Sorry, something went wrong.
Version of org.eclipse.jdt.core.compiler.batch is 3.34.0.v20230405-0323. I hope that's the right one.
org.eclipse.jdt.core.compiler.batch
3.34.0.v20230405-0323
OK, still broken on latest master, here is complete snippet:
import java.lang.annotation.Annotation; import java.util.stream.Stream; public class X { public static Stream<Class<? extends Annotation>> function(Stream<Annotation> annotations) { return annotations.map(Annotation::annotationType).filter(a -> true); } }
We report: Type mismatch: cannot convert from Stream<Class<capture#1-of ? extends Annotation>> to Stream<Class<? extends Annotation>>
Type mismatch: cannot convert from Stream<Class<capture#1-of ? extends Annotation>> to Stream<Class<? extends Annotation>>
@srikanth-sankaran : FYI.
See also #366, #837. I think there might be a few more about wildcards.
No branches or pull requests
The Eclipse Java compiler fails to compile the following Java code snippet:
with the following error message
But javac compiles it successfully, in the Guice framework:
https://github.com/google/guice/blob/654032a954d55a00fc5ee90da815da98cb6676a1/core/src/com/google/inject/spi/BindingSourceRestriction.java#L348-L350
When you check out the guice git-repository that leads to one error in the project.
The text was updated successfully, but these errors were encountered: