| Summary: | [compiler] wrong resolution for X.this involving an extending inner class | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Maxime Daniel <maxime_daniel> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Olivier_Thomann, philippe_mulet |
| Version: | 3.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
From testing, javac 1.3.1 behaved like us (i.e. print [X$1$N]). From 1.4 on, it will print [X] Problem comes from the generation of inner emulation for "{ new C(); }" which allows compatible match (i.e. 'this' is compatible with X).
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
I20080604-2000 Eclipse behaves differently than javac on InnerEmulationTest#87. Namely, it links X.this to X$1N in the following test case, instead of X, as javac does and JLS3 ยง15.8.4 demands: public class X { public static void main(String[] arguments) { new X().f(); } void f () { class C { C() { System.out.println("["+X.this.getClass().getName()+"]"); } } class N extends X { { new C(); } } new N(); } } Talked to Philippe and we believe this is a bug. Added an excuse to the test for now (should align with javac when this bug is fixed).