Return-Path: <###@###.###>
Date: Tue, 6 Aug 2002 13:27:04 -0700 (PDT)
From: ###@###.###
Subject: compiler error?
To: ###@###.###
Cc: ###@###.###
Should trying to compile this code (without an import for java.math)
produce the following error?
I realize of course that the import should be required for compilation
but I was wondering if that stack trace was intentional.
thanks
madbot
public class Odd {
public static void main(String[] args) throws Exception {
BigInteger b1 = new BigInteger("5");
System.out.println(b2);
}
}
/export/mantis/4726380> /export/mantis/build/solaris-sparc/bin/javac Odd.java
Odd.java:4: cannot resolve symbol
symbol : class BigInteger
location: class Odd
BigInteger b1 = new BigInteger("5");
^
Odd.java:4: cannot resolve symbol
symbol : class BigInteger
location: class Odd
BigInteger b1 = new BigInteger("5");
^
Odd.java:5: cannot resolve symbol
symbol : variable b2
location: class Odd
System.out.println(b2);
^
An exception has occurred in the compiler (1.4.1-internal). 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.AssertionError: unexpected kind: 256 in tree System.out.println
at com.sun.tools.javac.v8.comp.Attr.checkId(Attr.java:1198)
at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1075)
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:713)
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:1344)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1322)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1298)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:352)
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)
Date: Tue, 6 Aug 2002 13:27:04 -0700 (PDT)
From: ###@###.###
Subject: compiler error?
To: ###@###.###
Cc: ###@###.###
Should trying to compile this code (without an import for java.math)
produce the following error?
I realize of course that the import should be required for compilation
but I was wondering if that stack trace was intentional.
thanks
madbot
public class Odd {
public static void main(String[] args) throws Exception {
BigInteger b1 = new BigInteger("5");
System.out.println(b2);
}
}
/export/mantis/4726380> /export/mantis/build/solaris-sparc/bin/javac Odd.java
Odd.java:4: cannot resolve symbol
symbol : class BigInteger
location: class Odd
BigInteger b1 = new BigInteger("5");
^
Odd.java:4: cannot resolve symbol
symbol : class BigInteger
location: class Odd
BigInteger b1 = new BigInteger("5");
^
Odd.java:5: cannot resolve symbol
symbol : variable b2
location: class Odd
System.out.println(b2);
^
An exception has occurred in the compiler (1.4.1-internal). 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.AssertionError: unexpected kind: 256 in tree System.out.println
at com.sun.tools.javac.v8.comp.Attr.checkId(Attr.java:1198)
at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1075)
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:713)
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:1344)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1322)
at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1298)
at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:352)
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)
- duplicates
-
JDK-4755519 REGRESSION: java.lang.AssertionError: unexpected kind: 256 in tree System.err.pr
-
- Closed
-
-
JDK-4750979 java.lang.AssertionError: unexpected kind: 256 in tree System.err.println
-
- Closed
-
-
JDK-4738640 regression: compiler crash after resolution error
-
- Closed
-