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

Constructor reference accepts wildcard parameterized types

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • tools
    • b82
    • Verified

      This program should not compile:

      import java.util.*;

      interface SAM {
          Object m();
      }

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

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

              Created:
              Updated:
              Resolved: