eclipse-jdt / eclipse-jdt/eclipse.jdt.core
Bug 474355 - generics varargs problem - ecj behavior differs from javac
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
Bringing forward https://bugs.eclipse.org/bugs/show_bug.cgi?id=474355 to GitHub tracker.
Problem on the reporter snippet still exists on master.
```
import java.lang.Object;
import java.util.*;
public class GenericVarargsBug {
public static void main(String... args) {
List sth = new ArrayList<>();
sth.add(new byte[]{23, 23});
isItWorking(sth.get(0));
}
private static void isItWorking(Object... os) {
System.out.println("yes");
}
}
```
This program at run time generates a CCE with ECJ generated code but prints yes when compiled with javac.
However the snippet from https://bugs.eclipse.org/bugs/show_bug.cgi?id=474355#c2 generates a CCE with javac generated code also (JDK 24)
Contributor guide
Assessment
This issue has not been assessed yet.