I am still fighting with the cyclic inheritance problem and the fact that it gets compiled sometimes and other times it does not. It might be a bug in javac. Can somebody please take a look at this or tell me, whom I can contact for this issue?
For the bug to show, a class and an interface are needed:
sandbox/Foo.java:
<start code>
package sandbox;
class Foo implements Foo$Intf {
public static interface Moo$Intf {}
}
<end code>
sandbox/Foo$Intf.java:
<start code>
package sandbox;
import sandbox.Foo.Moo$Intf;
public interface Foo$Intf extends Foo.Moo$Intf {}
<end code>
This is a dependency-cycle and violates therefore JLS 8.1.4. But calling "javac -cp . sandbox/Foo\$Intf.java" is successful. I tried it using the version of javac, which is part of the javafx-repository, jdk 1.6.0_03 and jdk 1.6.0_10.
For the bug to show, a class and an interface are needed:
sandbox/Foo.java:
<start code>
package sandbox;
class Foo implements Foo$Intf {
public static interface Moo$Intf {}
}
<end code>
sandbox/Foo$Intf.java:
<start code>
package sandbox;
import sandbox.Foo.Moo$Intf;
public interface Foo$Intf extends Foo.Moo$Intf {}
<end code>
This is a dependency-cycle and violates therefore JLS 8.1.4. But calling "javac -cp . sandbox/Foo\$Intf.java" is successful. I tried it using the version of javac, which is part of the javafx-repository, jdk 1.6.0_03 and jdk 1.6.0_10.
- relates to
-
JDK-6557624 Stack overflow in Attr.attribClass
- Closed