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

add regression test related to fix for JDK-8078024

    XMLWordPrintable

Details

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

    Backports

      Description

        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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                  Created:
                  Updated:
                  Resolved: