Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4851398

generics: compiler crash when typevar bound is inner class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 5.0
    • tools
    • generic
    • solaris_8

      ==========$ cat -n Inference.java
           1 public class Inference {
           2 class A {}
           3 interface B {}
           4 class Foo<T extends A & B>{}
           5 }
      ==========$ newjavac -source 1.5 Inference.java
      + /usr/java1.5/bin/javac -source 1.5 Inference.java
      An exception has occurred in the compiler (1.5.0-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.NullPointerException
              at com.sun.tools.javac.comp.Flow.visitIdent(Flow.java:1155)
              at com.sun.tools.javac.tree.Tree$Ident.accept(Tree.java:930)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.comp.Flow.scanExpr(Flow.java:492)
              at com.sun.tools.javac.comp.Flow.visitApply(Flow.java:1057)
              at com.sun.tools.javac.tree.Tree$Apply.accept(Tree.java:742)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.tree.TreeScanner.visitExec(TreeScanner.java:171)
              at com.sun.tools.javac.tree.Tree$Exec.accept(Tree.java:660)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:476)
              at com.sun.tools.javac.comp.Flow.scanStats(Flow.java:484)
              at com.sun.tools.javac.comp.Flow.visitBlock(Flow.java:724)
              at com.sun.tools.javac.tree.Tree$Block.accept(Tree.java:482)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:476)
              at com.sun.tools.javac.comp.Flow.visitMethodDef(Flow.java:676)
              at com.sun.tools.javac.tree.Tree$MethodDef.accept(Tree.java:428)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:616)
              at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:394)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.comp.Flow.scanStat(Flow.java:476)
              at com.sun.tools.javac.comp.Flow.scanDef(Flow.java:462)
              at com.sun.tools.javac.comp.Flow.visitClassDef(Flow.java:608)
              at com.sun.tools.javac.tree.Tree$ClassDef.accept(Tree.java:394)
              at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:31)
              at com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:1184)
              at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:352)
              at com.sun.tools.javac.main.Main.compile(Main.java:494)
              at com.sun.tools.javac.Main.compile(Main.java:41)
              at com.sun.tools.javac.Main.main(Main.java:32)
      + exit 0
      ==========$

            duke J. Duke
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: