Bug 542110 - Unable to access protected nested class from subclass
Summary: Unable to access protected nested class from subclass
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.10   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug bulk move
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-04 18:40 EST by Stephan Herrmann CLA
Modified: 2022-08-06 12:30 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2018-12-04 18:40:38 EST
Note that javac has fixed the following bug in 9:
  https://bugs.openjdk.java.net/browse/JDK-8183183

Knowingly or unknowingly ecj detects the same problem that javac 8- detects.

Need to update ecj to accept such programs:

//---
package pkgA;

public class A<T> {
  protected static class Nested {}
} 
//---
package pkgB;

import pkgA.A;

public class B extends A<B.NestedB> {
  protected static class NestedB extends A.Nested {}
} 
//---

Currently we report:
----------
1. ERROR in /tmp/pkgB/B.java (at line 6)
        protected static class NestedB extends A.Nested {}
                                               ^^^^^^^^
The type A.Nested is not visible
----------
1 problem (1 error)
Comment 1 Manoj N Palat CLA 2019-02-11 04:15:55 EST
Bulk move out of 4.11
Comment 2 Manoj N Palat CLA 2019-08-27 02:06:39 EDT
Bulk move out of 4.13
Comment 3 Eclipse Genie CLA 2022-08-06 12:30:40 EDT
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.