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

(crash) mutually f-bounded type vars with multiple bounds may crash javac

XMLWordPrintable

    • 01
    • x86
    • windows_xp



      Name: rmT116609 Date: 05/01/2003


      FULL PRODUCT VERSION :
      I'm using the early access generics compiler with JDK 1.4.1.

      java version "1.4.1_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01)
      Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode)

      FULL OS VERSION :
      Windows XP Home

      A DESCRIPTION OF THE PROBLEM :
      The generics compiler crashes with a program that looks quite innocent to me.


      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      An exception has occurred in the compiler (1.4.1_01). 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.v8.code.Type.isSubType(Type.java:428)
      at com.sun.tools.javac.v8.comp.Check.checkExtends(Check.java:319)
      at com.sun.tools.javac.v8.comp.Check$Validator.visitTypeApply(Check.java:562)
      at com.sun.tools.javac.v8.tree.Tree$TypeApply.accept(Tree.java:975)
      at com.sun.tools.javac.v8.comp.Check.validate(Check.java:516)
      at com.sun.tools.javac.v8.comp.Check.validate(Check.java:526)
      at com.sun.tools.javac.v8.comp.Check$Validator.visitTypeParameter(Check.java:570)
      at com.sun.tools.javac.v8.tree.Tree$TypeParameter.accept(Tree.java:1001)
      at com.sun.tools.javac.v8.comp.Check.validate(Check.java:516)
      at com.sun.tools.javac.v8.comp.Check.validateTypeParams(Check.java:534)
      at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:1978)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1964)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1928)
      at com.sun.tools.javac.v8.comp.Attr.visitClassDef(Attr.java:336)
      at com.sun.tools.javac.v8.tree.Tree$ClassDef.accept(Tree.java:388)
      at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:212)
      at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:246)
      at com.sun.tools.javac.v8.comp.Attr.attribClassBody(Attr.java:2019)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1964)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1951)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1947)
      at com.sun.tools.javac.v8.comp.Attr.attribClass(Attr.java:1928)
      at com.sun.tools.javac.v8.comp.Attr.visitTypeParameter(Attr.java:1905)
      at com.sun.tools.javac.v8.tree.Tree$TypeParameter.accept(Tree.java:1001)
      at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:212)
      at com.sun.tools.javac.v8.comp.Attr.attribStat(Attr.java:246)
      at com.sun.tools.javac.v8.comp.Attr.attribStats(Attr.java:262)
      at com.sun.tools.javac.v8.comp.Enter$CompleteEnter.complete(Enter.java:1028)
      at com.sun.tools.javac.v8.code.Symbol.complete(Symbol.java:321)
      at com.sun.tools.javac.v8.code.Symbol$ClassSymbol.complete(Symbol.java:623)
      at com.sun.tools.javac.v8.comp.Enter.complete(Enter.java:656)
      at com.sun.tools.javac.v8.comp.Enter.main(Enter.java:635)
      at com.sun.tools.javac.v8.JavaCompiler.compile(JavaCompiler.java:311)
      at com.sun.tools.javac.v8.Main.compile(Main.java:484)
      at com.sun.tools.javac.Main.compile(Main.java:33)
      at com.sun.tools.javac.Main.main(Main.java:24)


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package genericstest;

      public class OuterClass {

      static interface I<T> {}
      static class X<T> {}
      static class A<U extends X<V> & I<V>, V extends I<U>> {}
      }

      ---------- END SOURCE ----------
      (Review ID: 182443)
      ======================================================================

            ahe Peter Ahe
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: