Community
Participate
Working Groups
Using latest compiler code, we reject the following code: class java {} Javac 1.4.1 and jikes 1.18 accept it. You can even define the following code: in java.java: [public class java { public static int lang = 3; }] in X.java: [class X { static int i = java.lang; }] It compiles without a problem. Only Javac 1.2.2 fails compiling this code. We fail with the errors: 1. ERROR in D:\temp\X.java (at line 3) static int i = java.lang; ^^^^^^^^^ java.lang cannot be resolved or is not a type ---------- ---------- 2. ERROR in d:\temp\java.java (at line 1) public class java { ^^^^ The type java collides with a package
Fixed.
Verified.