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

javac crashes when speculative attribution infers intersection type with array component

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8, 8-repo-lambda
    • 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));
          }
      }

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

              Created:
              Updated:
              Resolved: