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

Code compiling in javac does not compile in eclipse

Open
#136 2 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 following code (borrowed from https://github.com/google/guice/blob/e960b66d3d5931b9cb1aebd49e452e2c489a921e/core/src/com/google/inject/spi/BindingSourceRestriction.java#L348) seems to compile in javac (tested with temurin 11)
but does not compile in eclipse

```
import java.lang.annotation.Annotation;
import java.util.Arrays;
import java.util.stream.Stream;

public class BugTest {
private static Stream> getPermits(Class clazz) {
Stream annotations = Arrays.stream(clazz.getAnnotations());
return annotations.map(Annotation::annotationType).filter(a -> a.isAnnotationPresent(MyAnno.class));
}

public static @interface MyAnno {

}
}

```

`cannot convert from Stream> to Stream> BugTest.java `

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.