Because the inferred type using diamond with an anonymous class constructor could be outside the set of types supported by the signature attribute, using diamond with anonymous classes was disallowed in Java SE 7. As noted in the JSR 334 proposed final draft, it would be possible to ease this restriction if the inferred type was denotable.
- relates to
-
JDK-7020044 Project Coin: diamond erroneous allowed on some anonymous inner classes
-
- Closed
-
-
JDK-8062373 Project Coin: diamond and anonymous classes
-
- Closed
-