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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 8
    • Affects Version/s: 8, 8-repo-lambda
    • Component/s: tools
    • b93
    • Verified

      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) { }
      }

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

              Created:
              Updated:
              Resolved: