Community
Participate
Working Groups
A while ago, in the context of the method/constructor reference expression grammar changes, it was pointed out that JLS7 has two definitions of ReferenceType in different chapters: one that includes arrays and one that doesn't. We said that the one that includes arrays is the right one to use for parsers. It appears that this split-personality could be influencing 8b74's behavior in rejecting the snippet below: // ---- import java.io.serializeable; public class X { X [] x = (X[] & Serializable & Cloneable) new X[0]; // error: unexpected type, required class, found X[] } I cannot think of a non-pedantic case where this should matter, calling it out and tracking it just the same in case I missed some subtleties.
We will respond to any spec change (unlikely) that may happen in this space on a need basis. We don't want to push for such a change as the return is non-existent and work is too much. (See that ArrayBinding is not a ReferenceBinding).