History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEA-18343
Type: Bug Bug
Status: Open Open
Assignee: Alexey Kudravtsev
Reporter: Calum MacLean
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
IDEA: Feedback

Erroneous error referencing super-class field between inner classes

Created: 05 Jun 08 20:52   Updated: 05 Jun 08 20:57
Component/s: Editor. Error Highlighting

Build: 7,757
Severity: Medium


 Description  « Hide
In the code below, IDEA highlights an error for the field reference in SubClass, saying that it has private access in the super-class. The code actually compiles fine using Sun's Java 6 compiler (and I think in the latest Eclipse compiler).
Note that, if the reference is changed to simply "field" instead of "super.field", then there is a compilation error.
public class ContainerClass
{
    private class SuperClass
    {
        private int field;
    }
    
    private class SubClass extends SuperClass
    {
        private SubClass()
        {
            System.out.println(super.field);
        }
    }
}


 All   Comments   Work Log   Change History      Sort Order:
There are no comments yet on this issue.