| Summary: | [compiler] annotation fields can reference private static inner classes, inconsistent to oracle javac | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Jakob Magiera <jam> | ||||||
| Component: | Core | Assignee: | Manoj N Palat <manoj.palat> | ||||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | amj87.iitr, srikanth_sankaran | ||||||
| Version: | 3.8 | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | stalebug | ||||||||
| Attachments: |
|
||||||||
This is a problem in org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.canBeSeenBy(ReferenceBinding, ReferenceBinding) , where we think that the receiver type and the invocation type are both same i.e. CompilerTest. The invocation type in this case should be the enclosing type of ComplierTest which is null in this case, IMHO The fix for bug 316456 seems incomplete. Extending that should fix the problem. Created attachment 210643 [details]
proposed fix v1.0 + regression tests
Srikanth, can you take a quick look? Thanks!
Created attachment 210709 [details] proposed fix v1.0 + regression tests updated A full run of the test suite showed one test that needed remastering. Updated the patch. Ofcourse, comment 1 can be ignored. Manoj, Please review Ayush's fix and help take it forward. If patch needs to be synched up with latest, do so and repost a fresh patch. 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. If you have further information on the current state of the bug, please add it. 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 Identifier: 20110916-0149 @interface A{ String name(); } @A(name=CompilerTest.Q.X) public class CompilerTest { private static class Q { static final String X = "y"; //$NON-NLS-1$ } } Reproducible: Always Steps to Reproduce: The class and annotation outlined in the details compile with compliance level 1.6 in the eclipse IDE, but not with the oracle jdk compiler. Output of oracle jdk compiler: [ERROR] CompilerTest.java:[7,20] CompilerTest.Q has private access in CompilerTest