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

javac crashes when speculative attribution infers intersection type with array component

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 8-repo-lambda
    • Fix Version/s: 8
    • Component/s: tools
    • Subcomponent:
    • Resolved In Build:
      b102
    • Verification:
      Verified

      Description

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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: