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

Project Coin: problem with diamond and member inner classes

XMLWordPrintable

    • b01
    • unknown
    • generic
    • Verified

        This program does not compile:


        class X<T> {
            class Y<Z> {
                 Y(T a, Z b) { }
            }

            public static void main(String[] args) {
                X<String>.Y<String> x1 = new X<String>().new Y<String>("",""); //ok
                X<String>.Y<String> x2 = new X<String>().new Y<>("",""); //fails
            }
        }

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

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: