Summary: | Can't open overriden enum method. | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Brian Miller <Brian.Miller> |
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
Status: | VERIFIED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | amj87.iitr, daniel_megert, markus.kell.r, srikanth_sankaran |
Version: | 3.5 | ||
Target Milestone: | 3.7 M2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Brian Miller
2009-02-12 21:17:01 EST
Looks like a bug when resolving the element. Looks correct to me. The type of 'E.X' in 'E.X.bar()' is E, not the anonymous type. This becomes more clear if you change 'void bar(){}' in X to 'void bar2(){}' and then try to invoke 'E.X.bar2()' from outside. javac agrees with us that bar2() is not visible. (In reply to comment #2) > Looks correct to me. > > The type of 'E.X' in 'E.X.bar()' is E, not the anonymous type. This becomes > more clear if you change 'void bar(){}' in X to 'void bar2(){}' and then try to > invoke 'E.X.bar2()' from outside. javac agrees with us that bar2() is not > visible. Yes. cf. public class Bug { static class E { public static final E X = new E() { void bar() {}}; void bar(){} } void foo(){ E.X.bar(); } } Verified for 3.7M2. |