javac crashes when speculative attribution infers intersection type with array component

XMLWordPrintable

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

      Thsi program crashes javac

      import java.util.*;

      interface Supplier<D> {
         D make();
      }

      class CompilerCrash {
          void m(Object o) { }
          void m(char[] c) { }

          <C extends Collection<?>> C g(Supplier<C> sc) { return null; }


          // crashes when toString() is omitted
          void test() {
              m(g(LinkedList<Double>::new));
          }
      }

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

              Created:
              Updated:
              Resolved: