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

javac does not detect cyclic inheritance involving static inner classes after import clause

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P4
    • Resolution: Fixed
    • 7
    • 7
    • tools
    • b34
    • x86
    • linux
    • Not verified

    Description

      I am still fighting with the cyclic inheritance problem and the fact that it gets compiled sometimes and other times it does not. It might be a bug in javac. Can somebody please take a look at this or tell me, whom I can contact for this issue?

      For the bug to show, a class and an interface are needed:
      sandbox/Foo.java:
      <start code>
      package sandbox;

      class Foo implements Foo$Intf {
         
          public static interface Moo$Intf {}
         
      }
      <end code>

      sandbox/Foo$Intf.java:
      <start code>
      package sandbox;

      import sandbox.Foo.Moo$Intf;

      public interface Foo$Intf extends Foo.Moo$Intf {}
      <end code>


      This is a dependency-cycle and violates therefore JLS 8.1.4. But calling "javac -cp . sandbox/Foo\$Intf.java" is successful. I tried it using the version of javac, which is part of the javafx-repository, jdk 1.6.0_03 and jdk 1.6.0_10.

      Attachments

        Issue Links

          Activity

            People

              mcimadamore Maurizio Cimadamore
              mcimadamore Maurizio Cimadamore
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: