Name: laC46010 Date: 11/26/96
JDK1.1M Java compiler reports wrong source line number (16383)
in the first error message for the tests/lang/CLSS/clss205/clss20501 test
of the JCK1.1:
> /export/ld32/jdk_1.1M/bin/javac -d /export/ld12/java/leo/res/dev-jdk1.1-ff/classes tests/lang/CLSS/clss205/clss20501/clss20501.java
tests/lang/CLSS/clss205/clss20501/clss20501.java:16383: Invalid method declaration; return type required.
^
tests/lang/CLSS/clss205/clss20501/clss20501.java:10: Constructors can't be native, abstract, static, synchronized, or final: javasoft.sqe.tests.lang.clss205.clss20501.clss20501_a(int)
abstract clss20501_a(int arg){};
^
tests/lang/CLSS/clss205/clss20501/clss20501.java:22: Wrong number of arguments in constructor.
clss20501_b x = new clss20501_b(666);
^
3 errors
Previous version of JDK1.1 reported more correctly:
tests/lang/CLSS/clss205/clss20501/clss20501.java:10: Constructors can't be native, abstract, static, synchronized, or final: javasoft.sqe.tests.lang.clss205.clss20501.clss20501_a(int)
abstract clss20501_a(int arg){};
^
tests/lang/CLSS/clss205/clss20501/clss20501.java:13: Invalid method declaration; return type required.
final clss20501_a(int arg) {result1=arg+111;}
^
tests/lang/CLSS/clss205/clss20501/clss20501.java:22: Wrong number of arguments in constructor.
clss20501_b x = new clss20501_b(666);
^
3 errors
Test source:
------------------------------------------------------------------
// Ident: @(#)clss20501.java 1.1 96/10/29
// Copyright 29 ÏËÔ 1996 Sun Microsystems, Inc. All Rights Reserved
package javasoft.sqe.tests.lang.clss205.clss20501;
import java.io.PrintStream;
abstract class clss20501_a {
int result1;
abstract clss20501_a(int arg){};
}
class clss20501_b extends clss20501_a {
final clss20501_a(int arg) {result1=arg+111;}
}
public class clss20501 {
public static void main(String argv[])
{
System.exit(run(argv, System.out) + 95/*STATUS_TEMP*/);
}
public static int run(String argv[],PrintStream out) {
clss20501_b x = new clss20501_b(666);
return 2;
}
}
------------------------------------------------------------------
======================================================================
- duplicates
-
JDK-4017243 compiler reports bad line number
- Closed