Name: rmT116609 Date: 01/28/2002
java -version
java version "1.4.0-rc"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-rc-b91)
Java HotSpot(TM) Client VM (build 1.4.0-rc-b91, mixed mode)
DESCRIPTION OF THE PROBLEM :
An exception has occurred in the compiler (1.4.0-rc). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.InternalError
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1.
javac Son.java Father.java
EXPECTED VERSUS ACTUAL BEHAVIOR :
javac does not finish compilation.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
An exception has occurred in the compiler (1.4.0-rc). Please file a bug at the Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.InternalError: isSubType 13
at com.sun.tools.javac.v8.code.Type.isSubType(Type.java:494)
at com.sun.tools.javac.v8.code.Type$ClassType.isSubType(Type.java:1070)
at com.sun.tools.javac.v8.code.Type$ClassType.isSubType(Type.java:1078)
at com.sun.tools.javac.v8.code.Type.isSubTypes(Type.java:515)
at com.sun.tools.javac.v8.comp.Resolve.instantiate(Resolve.java:204)
at com.sun.tools.javac.v8.comp.Resolve.findMethod(Resolve.java:391)
at com.sun.tools.javac.v8.comp.Resolve.resolveQualifiedMethod(Resolve.java:835)
at com.sun.tools.javac.v8.comp.Attr.selectSym(Attr.java:1251)
at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:1195)
at com.sun.tools.javac.v8.tree.Tree$Select.visit(Tree.java:1063)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:259)
at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:274)
at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:833)
at com.sun.tools.javac.v8.tree.Tree$Apply.visit(Tree.java:869)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:259)
at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:282)
at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:661)
at com.sun.tools.javac.v8.tree.Tree$Exec.visit(Tree.java:765)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:259)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:296)
at com.sun.tools.javac.v8.comp.Attr.attribStats(Attr.java:314)
at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:462)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:539)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:259)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:296)
at com.sun.tools.javac.v8.comp.Attr._case(Attr.java:415)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:474)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:259)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:296)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1489)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1456)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:396)
at com.sun.tools.javac.v8.Main.compile(Main.java:526)
at com.sun.tools.javac.Main.compile(Main.java:32)
at com.sun.tools.javac.Main.main(Main.java:23)
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
###########
Father.java
###########
package tests;
public class Father {
public void print(InnerFather inf) {
inf.print();
}
public class InnerFather {
public void print() {
System.out.println("InnerFather");
}
}
}
###########
Son.java
###########
package tests;
public class Son extends Father {
public void print() {
super.print(new InnerSon());
}
private class InnerSon extends tests.Father$InnerFather {
public void print() {
System.out.println("InnerSon");
}
}
}
---------- END SOURCE ----------
The problem is reproducible with Linux Redhat 6.1, Solaris 2.8, Windows 2000 using 1.4.0-rc.
CUSTOMER WORKAROUND :
Do not use inner class extension.
(Review ID: 138890)
======================================================================