Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8130803

add regression test related to fix for JDK-8078024

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • tools
    • b73
    • Verified

        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.

              vromero Vicente Arturo Romero Zaldivar
              vromero Vicente Arturo Romero Zaldivar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: