Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8062373 Project Coin: diamond and anonymous classes
  3. JDK-8073593

15.9: Allow diamond to be used with anonymous classes

XMLWordPrintable

      As part of JEP 213, we'd like to relax the restriction that "If the class instance creation expression ends in a class body ... [and] TypeArgumentsOrDiamond is present after the Identifier, and denotes <>, then a compile-time error occurs."

      Instead, this should be allowed in general, but we must check after inference that the inferred type arguments can be expressed in the generated class file's Signature attribute. (I.e., no capture variables, no intersections, etc.)

            abuckley Alex Buckley
            dlsmith Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: