Currently, if an inner class has an error, the outer class will still
generate code:
public class Oops {
class inner {
inner() {
System.out.println(method());
}
int method() {
return "hello";
}
}
public static void main(String[] args) {
new Oops().new inner();
}
}
Compiling this yields Oops.class, but no Oops$inner.class.
This means that users of Makefiles need to list all inner classes as targets to ensure that they have an up-to-date project.
It would be nice if the main .class file could always be assumed to proxy for the rest of the nest.
generate code:
public class Oops {
class inner {
inner() {
System.out.println(method());
}
int method() {
return "hello";
}
}
public static void main(String[] args) {
new Oops().new inner();
}
}
Compiling this yields Oops.class, but no Oops$inner.class.
This means that users of Makefiles need to list all inner classes as targets to ensure that they have an up-to-date project.
It would be nice if the main .class file could always be assumed to proxy for the rest of the nest.
- relates to
-
JDK-4157566 new of an abstract inner class hides abstract class warning
- Closed