Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 400882 - [1.8][spec] Are arrays allowed in intersection casts ?
Summary: [1.8][spec] Are arrays allowed in intersection casts ?
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 trivial (vote)
Target Milestone: BETA J8   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 401003
  Show dependency tree
 
Reported: 2013-02-15 02:33 EST by Srikanth Sankaran CLA
Modified: 2013-11-11 00:10 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2013-02-15 02:33:36 EST
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.
Comment 1 Srikanth Sankaran CLA 2013-11-11 00:10:26 EST
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).