Duplicate :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Description: Compiler crashes with an Assertion error for the following code: <code> class TestClass { public static void main(String... args) { MyClass<? extends MyClass<?, ?>, ? extends MyClass<?, ?>> gg = null; } } class MyClass<T extends S, S> { } </code> Compilation result is : <output> Following is the Error message: An exception has occurred in the compiler (1.7.0-ea). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you. java.lang.AssertionError: isSubtype 15 at com.sun.tools.javac.code.Types$5.visitType(Types.java:361) at com.sun.tools.javac.code.Types$5.visitType(Types.java:342) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visitWildcardType(Types.java:3185) at com.sun.tools.javac.code.Type$WildcardType.accept(Type.java:430) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3183) at com.sun.tools.javac.code.Types.isSubtype(Types.java:338) at com.sun.tools.javac.code.Types.isSubtypeNoCapture(Types.java:325) at com.sun.tools.javac.code.Types$8.visitWildcardType(Types.java:812) at com.sun.tools.javac.code.Types$8.visitWildcardType(Types.java:761) at com.sun.tools.javac.code.Type$WildcardType.accept(Type.java:430) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3183) at com.sun.tools.javac.code.Types.containsType(Types.java:758) at com.sun.tools.javac.code.Types.containsType(Types.java:725) at com.sun.tools.javac.code.Types.giveWarning(Types.java:2923) at com.sun.tools.javac.code.Types.access$300(Types.java:66) at com.sun.tools.javac.code.Types$9.visitClassType(Types.java:983) at com.sun.tools.javac.code.Types$9.visitClassType(Types.java:885) at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:568) at com.sun.tools.javac.code.Types$DefaultTypeVisitor.visit(Types.java:3183) at com.sun.tools.javac.code.Types.isCastable(Types.java:876) at com.sun.tools.javac.comp.Check.checkExtends(Check.java:433) at com.sun.tools.javac.comp.Check.access$100(Check.java:55) at com.sun.tools.javac.comp.Check$Validator.visitTypeApply(Check.java:810) at com.sun.tools.javac.tree.JCTree$JCTypeApply.accept(JCTree.java:1840) at com.sun.tools.javac.comp.Check.validate(Check.java:745) at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:705) at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:709) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:372) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:409) at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:425) at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:761) at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:765) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:372) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:409) at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:680) at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:653) at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:372) at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:409) at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:2740) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2666) at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:2602) at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1050) at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:779) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:744) at com.sun.tools.javac.main.Main.compile(Main.java:386) at com.sun.tools.javac.main.Main.compile(Main.java:312) at com.sun.tools.javac.main.Main.compile(Main.java:303) at com.sun.tools.javac.Main.compile(Main.java:82) at com.sun.tools.javac.Main.main(Main.java:67) </output> <version> /net/sqindia/export/disk09/jdk/7/latest/binaries/solsparc/bin/java -version java version "1.7.0-ea" Java(TM) SE Runtime Environment (build 1.7.0-ea-b24) Java HotSpot(TM) Client VM (build 12.0-b01, mixed mode) uname -a SunOS bonsai 5.11 snv_49 i86pc i386 i86pc *** (#1 of 1): 2007-10-01 15:42:18 GMT+05:30 ###@###.###
|