add regression test related to fix for JDK-8078024

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 9
    • Affects Version/s: 9
    • Component/s: 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.

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

                Created:
                Updated:
                Resolved: