Summary: | problem M3 sourcebuild, linux/gtk - build error | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Bill Welch <billw> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED DUPLICATE | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | dirk_baeumer |
Version: | 2.1 | ||
Target Milestone: | 2.1 M4 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Bill Welch
2002-11-20 11:24:32 EST
Any idea what can cause this problem. Since we never do source builds my ourselves I appreciate some help here. This is a simpler test case: [package p; import p.X.Y.Z.W; public class X { private static class Y { private static class Z { public static class W { } } } }] javac 1.4.1 reports: X.java:3: p.X.Y has private access in p.X import p.X.Y.Z.W; ^ X.java:3: p.X.Y.Z has private access in p.X.Y import p.X.Y.Z.W; ^ X.java:3: p.X.Y.Z.W in p.X.Y.Z is not defined in a public class or interface; cannot be accessed from outside package import p.X.Y.Z.W; ^ 3 errors Eclipse compiler compiles that code without an error, but if you changed it for: [package p; import p.X.Y.Z; public class X { private static class Y { private static class Z { public static class W { } } } }] We do report a problem: ---------- 1. ERROR in D:\temp\X.java (at line 3) import p.X.Y.Z; ^^^^^^^ The imported type p.X.Y.Z is not visible ---------- Compiled 13 lines in 969 ms (13.4 lines/s) 1 problem (1 error) So I would say we should fail compiling the first test case. Jikes fails as well with these errors: Found 2 semantic errors compiling "D:/temp/X.java": 3. import p.X.Y.Z.W; ^-----^ *** Error: The type "p/X$Y$Z" has private access and is not accessible here. 3. import p.X.Y.Z.W; ^---^ *** Error: The type "p/X$Y" has private access and is not accessible here. Changing the private visibility of the static members for a default visibility would fix the javac failure. *** This bug has been marked as a duplicate of 26841 *** |