eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Eclipse Java-Compiler fails to interfere wildcard type
Open
bug
compiler
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 47
Description
The Eclipse Java compiler fails to compile the following Java code snippet:
```
public static Stream> function(Stream annotations) {
return annotations.map(Annotation::annotationType).filter(a -> true);
}
```
with the following error message
```
Type mismatch: cannot convert from Stream> to Stream>
```
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.
Contributor guide
Assessment
This issue has not been assessed yet.