Compilation yields no class files, redux
David Conrad
drconrad at gmail.com
Sun Jun 3 23:08:54 PDT 2012
Regret to inform, I think I just found another case where
the lambda compiler exits with status 0, no errors or
warnings, but generates no class file.
C.java and Bad.java are in the same directory:
package com.example;
public class C {
public static String m() { return ""; }
}
public class Bad {
public static void main(String[] args) {
System.out.println(C.m());
}
}
Steps to reproduce:
javac C.java
mkdir -p com/example
mv C.class com/example/
javac Bad.java
Actual results: null, zip, nada
Expected results:
Bad.java:3: error: cannot access C
System.out.println(C.m());
^
bad source file: .\C.java
file does not contain class C
Please remove or make sure it appears in the correct subdirectory of
the sourcepath.
1 error
Note: the last few lines of javac -Xlint:all -verbose Bad.java are:
[loading RegularFileObject[.\C.java]]
[parsing started RegularFileObject[.\C.java]]
[parsing completed 1ms]
[total 307ms]
I just did a pull-update-rebuild from the lambda repository,
still happens. It does the expected thing if the line is:
C c = new C();
David
P.S. In case you're wondering who this David Conrad is who
is suddenly posting here, I'm just J. Random Java Programmer
who has been lurking on the list for quite some time.
More information about the lambda-dev
mailing list