Community
Participate
Working Groups
build 20021119 1) create X.java package p; public class X { private class Y { public class Z { } } } 2) create A.java import p.X.Y.Z; public class A { } 3) do ctrl+B (Build) There is no error. Compile these files with javac 1.4.1, 2 errors are detected: D:\workspace\Project\src\p\A.java:1: p.X.Y has private access in p.X import p.X.Y.Z; ^ D:\workspace\Project\src\p\A.java:1: p.X.Y.Z in p.X.Y is not defined in a public class or interface; cannot be accessed from outside package import p.X.Y.Z; ^
*** Bug 26843 has been marked as a duplicate of this bug. ***
Indeed, we were not checking visibility when resolving member types in import. Check added. Note it was working fine for supertype reference, only import references were wrong. Fixed.
*** Bug 26784 has been marked as a duplicate of this bug. ***
Verified.