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

javac does not generate signature attributes for classes extending parameterized inner classes

XMLWordPrintable

    • b64
    • unknown, x86
    • generic, solaris_10
    • Verified

      class A<T extends A<T>> {
          class C {
              public T getT() { return null; }
          }
      }

      class B extends A<B> {
          public class D extends A<B>.C {}
      }

      class Test {
          void test(B.D d) {
              B b = d.getT();
          }
      }

      If all three classes are compiled at the same time, no error occurs. If, after having compiled all classes, only Test is recompiled, the following compiler error occurs:

      TestX.java:14: incompatible types
              B b = d.getT();
                          ^
        required: B
        found: A
      1 error

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: