Bug 7072 - Protected member in superclass not visible in subclass
Summary: Protected member in superclass not visible in subclass
Status: RESOLVED DUPLICATE of bug 3368
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-12-18 17:05 EST by Mark Rose CLA
Modified: 2002-01-11 08:56 EST (History)
0 users

See Also:


Attachments
ZIP file with Java source files exhibiting the bug (4.73 KB, application/octet-stream)
2001-12-18 17:05 EST, Mark Rose CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Rose CLA 2001-12-18 17:05:19 EST
(May be related to #7066)

Eclipse version: 2.0 build 20011206
Works fine in JDK 1.3.1_01

When creating a subclass in a different package than the superclass, a 
protected inner class in the superclass isn't visible. (Appears to work OK if 
the subclass and superclass are in the same package.)

Class Hierarchy:
    public class One {
        public static class Inner {}
    }
    public class Two extends One {
        protected static class Inner extends One.Inner {}   <--- 1
    }
    public class Three extends Two {
        public static class Inner extends Two.Inner {}      <--- 2
    }

Note 1: If this is changed from protected to public all is OK.
Note 2: If Three is in the same package as Two, all is OK.
        If not, Two.Inner is marked as "not visible"

Actual source files are attached.
Comment 1 Mark Rose CLA 2001-12-18 17:05:43 EST
Created attachment 195 [details]
ZIP file with Java source files exhibiting the bug
Comment 2 Philipe Mulet CLA 2001-12-19 05:47:15 EST
Indeed this is a duplicate of 7066 or 3368.

*** This bug has been marked as a duplicate of 3368 ***