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

Compiler goes into infinite loop for Cyclic Inheritance test case

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 7
    • 7
    • tools
    • b25
    • generic
    • generic
    • Not verified

      Description:
      StackOverFlow Error while trying to compile the following Cyclic inheritance test code
      If the bound to TypeParameter T is commented, Compiler works fine throwing cyclic inheritance error as expected.
      <code>
      bash-3.00$ cat Cyclic.java
      class Cyclic <T extends Cyclic.Inn> extends Cyclic {

           class Inn extends Cyclic.Inn{

           }
      }


      </code>
      Compilation result is :
      <output>
      The system is out of resources.
      Consult the following stack trace for details.
      java.lang.StackOverflowError
              at com.sun.tools.javac.code.Type$ClassType.accept(Type.java:568)
              at com.sun.tools.javac.code.Types$UnaryVisitor.visit(Types.java:3240)
              at com.sun.tools.javac.code.Types.supertype(Types.java:1605)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:889)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)
              at com.sun.tools.javac.comp.Resolve.findMemberType(Resolve.java:891)


      </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)

      bash-3.00$ uname -a
      SunOS hrajan 5.10 Generic sun4u sparc SUNW,Sun-Blade-100

            mcimadamore Maurizio Cimadamore
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: