from 4480593, broken out of 4094180:
When compiling the following class
class t
{
public static void main(String[] args)
{
Class c = t.class;
System.out.println(c);
}
int class$t() { return 0; }
}
the following exception trace was obtained.
C:\jdk1.4\bin>javac t.java
An exception has occurred in the compiler (1.4.0-beta). Please file a bug at the
Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after ch
ecking the Bug Parade for duplicates. Include your program and the following dia
gnostic in your report. Thank you.
java.lang.ClassCastException: com.sun.tools.javac.v8.code.Symbol$MethodSymbol
at com.sun.tools.javac.v8.comp.TransInner.cacheSym(TransInner.java:1528)
at com.sun.tools.javac.v8.comp.TransInner.classOfType(TransInner.java:1582)
at com.sun.tools.javac.v8.comp.TransInner.classOf(TransInner.java:1547)
at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1954)
at com.sun.tools.javac.v8.tree.Tree$Select.visit(Tree.java:1200)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:120)
at com.sun.tools.javac.v8.tree.Tree$VarDef.visit(Tree.java:604)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:58)
at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:129)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:644)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:114)
at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1748)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:569)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1678)
at com.sun.tools.javac.v8.tree.Tree$ClassDef.visit(Tree.java:521)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.comp.TransInner.translate(TransInner.java:1638)
at com.sun.tools.javac.v8.comp.TransInner.translateTopLevelClass(TransInner.java:1988)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:484)
at com.sun.tools.javac.v8.Main.compile(Main.java:505)
at com.sun.tools.javac.Main.compile(Main.java:27)
at com.sun.tools.javac.Main.main(Main.java:16)
When compiling the following class
class t
{
public static void main(String[] args)
{
Class c = t.class;
System.out.println(c);
}
int class$t() { return 0; }
}
the following exception trace was obtained.
C:\jdk1.4\bin>javac t.java
An exception has occurred in the compiler (1.4.0-beta). Please file a bug at the
Java Developer Connection (http://java.sun.com/cgi-bin/bugreport.cgi) after ch
ecking the Bug Parade for duplicates. Include your program and the following dia
gnostic in your report. Thank you.
java.lang.ClassCastException: com.sun.tools.javac.v8.code.Symbol$MethodSymbol
at com.sun.tools.javac.v8.comp.TransInner.cacheSym(TransInner.java:1528)
at com.sun.tools.javac.v8.comp.TransInner.classOfType(TransInner.java:1582)
at com.sun.tools.javac.v8.comp.TransInner.classOf(TransInner.java:1547)
at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1954)
at com.sun.tools.javac.v8.tree.Tree$Select.visit(Tree.java:1200)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:120)
at com.sun.tools.javac.v8.tree.Tree$VarDef.visit(Tree.java:604)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:58)
at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:129)
at com.sun.tools.javac.v8.tree.Tree$Block.visit(Tree.java:644)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.tree.TreeTranslator._case(TreeTranslator.java:114)
at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1748)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.visit(Tree.java:569)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.comp.TransInner._case(TransInner.java:1678)
at com.sun.tools.javac.v8.tree.Tree$ClassDef.visit(Tree.java:521)
at com.sun.tools.javac.v8.tree.TreeTranslator.translate(TreeTranslator.java:45)
at com.sun.tools.javac.v8.comp.TransInner.translate(TransInner.java:1638)
at com.sun.tools.javac.v8.comp.TransInner.translateTopLevelClass(TransInner.java:1988)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:484)
at com.sun.tools.javac.v8.Main.compile(Main.java:505)
at com.sun.tools.javac.Main.compile(Main.java:27)
at com.sun.tools.javac.Main.main(Main.java:16)
- relates to
-
JDK-4094180 # Synthetic names can conflict with explicit declaration
- Closed