JDK-4630799 : Parse error for import declaration
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 1.4.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2002-01-30
  • Updated: 2002-01-30
  • Resolved: 2002-01-30
Related Reports
Duplicate :  
Description
Please see the following test and error message. Jdk1.3 javac can compile T.java successfully.

% cat T.java
import W;
public class T {
}

% cat W.java
public interface W {
}

%/net/koori.sfbay/a/v01/jdk/1.4/beta/binaries/solsparc/bin/javac -verbose T.java
[parsing started T.java]
T.java:1: '.' expected
import W;
        ^
[parsing completed 464ms]
[checking T]
[loading /net/koori.sfbay/a/v01/jdk/1.4/beta/binaries/solsparc/jre/lib/rt.jar(java/lang/Object.class)]
[total 2268ms]
1 error

Comments
EVALUATION Your program is in error. Prior versions of javac incorrectly failed to diagnose the problem. Now that 4361575 has been fixed, the compiler correctly diagnoses the error. ###@###.### 2002-01-30
30-01-2002