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

javac crashes when varargs element of a method reference is inferred from the context

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2
    • 8
    • 8, 8-repo-lambda
    • tools
    • b93
    • Verified

    Description

      The following program crashes javac:

      import java.util.List;

      interface Function<X,Y> {
          Y m(X x);
      }

      class Test {
          
          static void test() {
              zip(Test::asList);
          }

          public static <T> List<T> asList(T... a) {
              return null;
          }

          public static <C> void zip(Function<String, C> zipper) { }
      }

      Attachments

        Activity

          People

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: