-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Labels
bugSomething isn't workingSomething isn't workingcompilerEclipse Java Compiler (ecj) related issuesEclipse Java Compiler (ecj) related issuesregressionSomething was broken by a previous changeSomething was broken by a previous change
Description
ECJ fails to compile this whilst javac succeeds along with ECJ 2025-09:
public static void main(List<?> l) {
get(get(get(l)));
}
public static <T> List<?> get(List<T> l) {
return l;
}If I remove one of the get calls or change any of the type parameters of List for the get method then it compiles.
This seems to be due to the bounds ending up as:
Type Bounds:
TypeBound T#0 = capture#1-of ?
Dependency (?)#2 = T#1
TypeBound (?)#2 = java.lang.Object
TypeBound T#1 = java.lang.Object
Dependency (?)#4 = T#3
Capture Bounds:
List<(?)#4> = capt(List<?>)
List<(?)#2> = capt(List<?>)
and JLS §18.3.2 stating αi = R implies the bound false.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompilerEclipse Java Compiler (ecj) related issuesEclipse Java Compiler (ecj) related issuesregressionSomething was broken by a previous changeSomething was broken by a previous change