| Summary: | [compiler] Inner Inner Class cannot see outer class member var | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ivaylo <ivaylo.kovatchev> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | Brian.Miller, jerome_lanneluc, Olivier_Thomann |
| Version: | 3.3 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | stalebug | ||
Verified that javac accepts this code. The reported error is : 'No enclosing instance of the type Test is accessible in scope' Philippe, please take a look. Added (disabled) InnerEmulationTest#test153-154 Happens when accessing either an outer field or an outer method. 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. |
Build ID: I20070625-1500 Steps To Reproduce: public class Test { public class Test3 { protected void load() { } } public class Test2 { public Test2(String string, Test3 test3) { } } private String var1; private class Test5 { private class Test4 extends Test2 { public Test4() { super("available", new Test3() { @Override protected void load() { System.out.println(var1.trim()); } }); } } } } More information: The above code generates a compiler error. However, invoking ctrl-space code complete correctly identifies the variable var1 as accessible.