Spurious error when constructor reference mention an interface type

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8
    • Component/s: tools
    • b82
    • Verified

      This program

      import java.util.*;

      interface SAM {
          Object m();
      }

      class Test {
          SAM s = SAM::new;
      }

      Gives:

      Test.java:8: error: {0} is abstract; cannot be instantiated
          SAM s = SAM::new;
                  ^
      1 error


      Error message should be improved.

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

              Created:
              Updated:
              Resolved: