This is new in Mantis-b02. Mantis-b01 doesn't have this error.
Only tested on Win2K, but I think this isn't platform-specific.
Try the following test:
==============================================
public class Test1 {
public static void main(String[] args) {
System.err.println("string" = 2);
}
}
==============================================
javac from Mantis-b02 produces the following output:
Z:\tests\OwnTests\javac>k:javac Test1.java
Test1.java:3: unexpected type
required: variable
found : value
System.err.println("string" = 2);
^
An exception has occurred in the compiler (1.4.2-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.AssertionError: unexpected kind: 256 in tree System.err.println
at com.sun.tools.javac.v8.comp.Attr.checkId(Attr.java:1216)
at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1093)
at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:213)
at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java:717)
at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java:877)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:221)
at com.sun.tools.javac.v8.comp.Attr.visitExec(Attr.java:556)
at com.sun.tools.javac.v8.tree.Tree$Exec.accept(Tree.java:773)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:235)
at com.sun.tools.javac.v8.comp.Attr.attribStats(Attr.java:253)
at com.sun.tools.javac.v8.comp.Attr.visitBlock(Attr.java:384)
at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:235)
at com.sun.tools.javac.v8.comp.Attr.visitMethodDef(Attr.java:341)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.accept(Tree.java:482)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:235)
at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:1362)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1340)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1316)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:355)
at com.sun.tools.javac.v8.Main.compile(Main.java:567)
at com.sun.tools.javac.Main.compile(Main.java:36)
at com.sun.tools.javac.Main.main(Main.java:27)
while javac from Mantis-b01 doesn't produce any exception.
Only tested on Win2K, but I think this isn't platform-specific.
Try the following test:
==============================================
public class Test1 {
public static void main(String[] args) {
System.err.println("string" = 2);
}
}
==============================================
javac from Mantis-b02 produces the following output:
Z:\tests\OwnTests\javac>k:javac Test1.java
Test1.java:3: unexpected type
required: variable
found : value
System.err.println("string" = 2);
^
An exception has occurred in the compiler (1.4.2-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.AssertionError: unexpected kind: 256 in tree System.err.println
at com.sun.tools.javac.v8.comp.Attr.checkId(Attr.java:1216)
at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1093)
at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:213)
at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java:717)
at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java:877)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:221)
at com.sun.tools.javac.v8.comp.Attr.visitExec(Attr.java:556)
at com.sun.tools.javac.v8.tree.Tree$Exec.accept(Tree.java:773)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:235)
at com.sun.tools.javac.v8.comp.Attr.attribStats(Attr.java:253)
at com.sun.tools.javac.v8.comp.Attr.visitBlock(Attr.java:384)
at com.sun.tools.javac.v8.tree.Tree$Block.accept(Tree.java:547)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:235)
at com.sun.tools.javac.v8.comp.Attr.visitMethodDef(Attr.java:341)
at com.sun.tools.javac.v8.tree.Tree$MethodDef.accept(Tree.java:482)
at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:235)
at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:1362)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1340)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1316)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:355)
at com.sun.tools.javac.v8.Main.compile(Main.java:567)
at com.sun.tools.javac.Main.compile(Main.java:36)
at com.sun.tools.javac.Main.main(Main.java:27)
while javac from Mantis-b01 doesn't produce any exception.
- duplicates
-
JDK-4728559 compiler crash after resolution error
-
- Resolved
-