The following code:
public class CyclicScoping {
class Inner1 extends Inner2 {}
class Inner2 {
class Inner3 extends Inner1 {}
}
}
causes
java.lang.ClassCastException: sun.tools.tree.LocalField
at sun.tools.javac.SourceField.createArgumentFields(SourceField.java)
at sun.tools.javac.SourceField.resolveTypeStructure(SourceField.java)
at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
at sun.tools.javac.SourceField.resolveTypeStructure(SourceField.java)
at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
at sun.tools.java.ClassDefinition.basicCheck(ClassDefinition.java)
at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An exception has occurred in the compiler; please file a bug report (###@###.###).
1 error
public class CyclicScoping {
class Inner1 extends Inner2 {}
class Inner2 {
class Inner3 extends Inner1 {}
}
}
causes
java.lang.ClassCastException: sun.tools.tree.LocalField
at sun.tools.javac.SourceField.createArgumentFields(SourceField.java)
at sun.tools.javac.SourceField.resolveTypeStructure(SourceField.java)
at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
at sun.tools.javac.SourceField.resolveTypeStructure(SourceField.java)
at sun.tools.javac.SourceClass.resolveTypeStructure(SourceClass.java)
at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
at sun.tools.java.ClassDefinition.basicCheck(ClassDefinition.java)
at sun.tools.javac.SourceClass.basicCheck(SourceClass.java)
at sun.tools.java.ClassDeclaration.getClassDefinition(ClassDeclaration.java)
at sun.tools.javac.Main.compile(Main.java)
at sun.tools.javac.Main.main(Main.java)
error: An exception has occurred in the compiler; please file a bug report (###@###.###).
1 error
- duplicates
-
JDK-4089169 Inner class testcase causes javac to go into inifinite loop
- Closed