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

Project Coin: diamond inference fail with generic constructor explicit type-arguments

XMLWordPrintable

    • b142
    • unknown
    • generic
    • Verified

      This program does not compile even if it should:

      public class DiamondTest {
         static class Foo<T extends Number> {
             <S extends T> Foo(S s) { }
         }


         public static void main(String... args) {
             Object o0 = new <Integer> Foo<>(null); // javac unhappy!
         }
      }

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: