Constructor reference accepts wildcard parameterized types

XMLWordPrintable

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

      This program should not compile:

      import java.util.*;

      interface SAM {
          Object m();
      }

      class Test {
          SAM s = ArrayList<?>::new;
      }

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

              Created:
              Updated:
              Resolved: