-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b46
-
generic, sparc
-
generic, solaris_8
-
Verified
Name: ngR10089 Date: 03/03/2004
javac (jdk1.5.0-b40) crashes while compile test below.
> java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b40)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b40, mixed mode)
> javac -d . -source 1.5 test.java
test.java:5: cannot find symbol
symbol : constructor <java.lang.String>cl_a(java.lang.String)
location: class p.cl_a
cl_a x = new <String> cl_a(new String("Hello")) {
^
test.java:5: cannot find symbol
symbol : constructor cl_a()
location: class p.cl_a
cl_a x = new <String> cl_a(new String("Hello")) {
^
An exception has occurred in the compiler (1.5.0-beta2). 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
at com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:1331)
at com.sun.tools.javac.tree.Tree$NewClass.accept(Tree.java:840)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:271)
at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:542)
at com.sun.tools.javac.tree.Tree$VarDef.accept(Tree.java:511)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:307)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:572)
at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:540)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:510)
at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:482)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:256)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:291)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2337)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2270)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2221)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:410)
at com.sun.tools.javac.main.Main.compile(Main.java:586)
at com.sun.tools.javac.main.Main.compile(Main.java:538)
at com.sun.tools.javac.Main.compile(Main.java:44)
at com.sun.tools.javac.Main.main(Main.java:35)
>
--------------- test.java-------------
package p;
public class test {
public static void main(String[] argv) {
cl_a x = new <String> cl_a(new String("Hello")) {
};
}
}
class cl_a<T extends Number> {
<A> cl_a(A val) {
}
}
---------------------------------------
New JCK tests
lang/EXPR/expr670/expr67003m1/expr67003m1.html
fails due to this bug.
======================================================================
- duplicates
-
JDK-5009163 Internal compiler error, but only when run from image?
-
- Closed
-