-
Notifications
You must be signed in to change notification settings - Fork 162
Closed
Labels
compilerEclipse Java Compiler (ecj) related issuesEclipse Java Compiler (ecj) related issues
Milestone
Description
With Eclipse 4.37 & 4.38M2 nightly, the following code:
public class Test {
static class Obj<T> {
}
public static void main(String[] args) {
String arg = "";
Stream<Obj<?>> stream11 = Stream.of(newObj());
Stream<Obj<?>> stream21 = Stream.of(newObj2(arg));
Stream<Obj<?>> stream12 = Stream.of(newObj(), newObj());
Stream<Obj<?>> stream22 = Stream.of(newObj2(arg), newObj2(arg));
//Stream<Obj<?>> stream11f = Stream.of(newObj()).filter(Objects::nonNull); // javac & eclipse KO
//Stream<Obj<?>> stream21f = Stream.of(newObj2(arg)).filter(Objects::nonNull); // javac & eclipse KO
Stream<Obj<?>> stream12f = Stream.of(newObj(), newObj()).filter(Objects::nonNull);
Stream<Obj<?>> stream22f = Stream.of(newObj2(arg), newObj2(arg)).filter(Objects::nonNull); // javac OK, eclipse KO
}
public static Obj<?> newObj() {
return new Obj<>();
}
public static <T> Obj<?> newObj2(T arg) {
return new Obj<>();
}
}
Gives an inconsistent result for stream22f where it works on javac but not on eclipse :
Type mismatch: cannot convert from Stream<Test.Obj> to Stream<Test.Obj<?>> Test.java /test/src/main/java/test line 25 Java Problem
(that's my last issue, thanks guys for your work)
Metadata
Metadata
Assignees
Labels
compilerEclipse Java Compiler (ecj) related issuesEclipse Java Compiler (ecj) related issues