-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b73
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8136267 | emb-9 | Vicente Arturo Romero Zaldivar | P4 | Resolved | Fixed | team |
Fix for JDK-8078024 may provoke previously rejected code to be accepted now. As an example this code:
import java.util.Arrays;
import java.util.List;
class K {
public static <A> List<List<A>> cartesianProduct(List<? extends A>... lists) {
return cartesianProduct(Arrays.asList(lists));
}
public static <B> List<List<B>> cartesianProduct(List<? extends List<? extends B>> lists) {
throw new AssertionError();
}
}
which was rejected before the patch, is now accepted by javac. See original report, by Liam Miller-Cushon, and discussion at: http://mail.openjdk.java.net/pipermail/compiler-dev/2015-July/009655.html
A regression test based on this code should be added to javac's test suite.
import java.util.Arrays;
import java.util.List;
class K {
public static <A> List<List<A>> cartesianProduct(List<? extends A>... lists) {
return cartesianProduct(Arrays.asList(lists));
}
public static <B> List<List<B>> cartesianProduct(List<? extends List<? extends B>> lists) {
throw new AssertionError();
}
}
which was rejected before the patch, is now accepted by javac. See original report, by Liam Miller-Cushon, and discussion at: http://mail.openjdk.java.net/pipermail/compiler-dev/2015-July/009655.html
A regression test based on this code should be added to javac's test suite.
- backported by
-
JDK-8136267 add regression test related to fix for JDK-8078024
-
- Resolved
-
- relates to
-
JDK-8078024 javac, several incorporation steps are silently failing when an error should be reported
-
- Closed
-