eclipse-jdt / eclipse-jdt/eclipse.jdt.core

Eclipse Java-Compiler fails to interfere wildcard type

Open
#1,053 4 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.