-
Bug
-
Resolution: Fixed
-
P2
-
9
-
b85
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142246 | emb-9 | Jan Lahoda | P2 | Resolved | Fixed | team |
Consider these files:
=== ./P/Outer.java ===
package P;
import static P.Outer.Nested.*;
import static P.Q.C.*;
public class Outer {
public static class Nested implements I {
}
}
=== ./P/Q/C.java ===
package P.Q;
public class C extends D {
}
=== ./P/Q/D.java ===
package P.Q;
public class D {
public interface I {
}
}
=================
Compiling these files like this:
$ javac P/Outer.java P/Q/C.java P/Q/D.java
fails with:
P/Outer.java:7: error: cannot find symbol
public static class Nested implements I {
^
symbol: class I
location: class Outer
1 error
The compilation passes when the compilation runs like:
$ javac P/Q/C.java P/Q/D.java P/Outer.java
This is on:
$ javac -fullversion
javac full version "1.9.0-ea-b54"
Reported here:
http://mail.openjdk.java.net/pipermail/compiler-dev/2015-March/009367.html
=== ./P/Outer.java ===
package P;
import static P.Outer.Nested.*;
import static P.Q.C.*;
public class Outer {
public static class Nested implements I {
}
}
=== ./P/Q/C.java ===
package P.Q;
public class C extends D {
}
=== ./P/Q/D.java ===
package P.Q;
public class D {
public interface I {
}
}
=================
Compiling these files like this:
$ javac P/Outer.java P/Q/C.java P/Q/D.java
fails with:
P/Outer.java:7: error: cannot find symbol
public static class Nested implements I {
^
symbol: class I
location: class Outer
1 error
The compilation passes when the compilation runs like:
$ javac P/Q/C.java P/Q/D.java P/Outer.java
This is on:
$ javac -fullversion
javac full version "1.9.0-ea-b54"
Reported here:
http://mail.openjdk.java.net/pipermail/compiler-dev/2015-March/009367.html
- backported by
-
JDK-8142246 Compilation still depends on the order of imports
- Resolved
- relates to
-
JDK-8056066 JEP 216: Process Import Statements Correctly
- Closed