Summary: | CastExpression resolution departs from JLS section 6.5.1 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Chapman Flack <chap0> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | kent_johnson | ||||
Version: | 2.1 | ||||||
Target Milestone: | 2.1.1 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Chapman Flack
2003-03-20 23:28:21 EST
Reproduced. Indeed, this is a bug. Created attachment 4278 [details]
patch for BlockScope
Kent - pls verify patch In this particular case, a workaround is to not qualify, however in general, when accessing from some external code, this isn't possible. However, this isn't a new bug. Not critical for 2.1 Thanks for the quick patch! I'll give it a try. I'm not sure I understand the last couple of comments. If this is not a new bug, is it an old bug? I did search first, but I didn't find it. Sorry if I missed it. As you point out, the workaround of using an unqualified name is not feasible in the general case. Also, as you would guess, the problem is most likely to be apparent in generated code, where the member names are constrained by some external design requirement; otherwise one would just use different names and never see the problem. That means in the practical situations where this bug is likely to bite, there may be no really practical workaround--one that doesn't require redesign of a code generator and a number of related components. By old bug, I meant it isn't a recent regression but rather a long standing bug. I agree this isn't trivial to workaround, but since we are in strict release mode (see Eclipse end game plan), only stop ship bugs are to be addressed at this stage. Such a collision scenario isn't very frequent to make it critical (we had it wrong in 2.0 as well, and nobody noticed until today). Patch looks good. Defer Reopening Fixed Backported to 2.1 maintenance stream. Fixed in 2.2 stream as well. Verified. Verified in 3.0M1 |