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

add regression test related to fix for JDK-8078024

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b73
    • Verification:
      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

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

                  Dates

                  Created:
                  Updated:
                  Resolved: