generics: missing bridge method for inherited implementation

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.2
    • Affects Version/s: 5.0
    • Component/s: tools
    • mantis
    • generic
    • solaris_8

      The following program compiles without error (as it should(?)) but
      no bridge method is added in D for the method from A. Consequently,
      this program fails at runtime with an abstract method error.


      interface A<T> {
          void f(T u);
      }

      class B {
          public void f(Integer i) {}
      }

      abstract class C<T> extends B implements A<T> {
          public void g(T t) {
              f(t);
          }
      }

      class D extends C<Integer> {
          public static void main(String[] args) {
              new D().g(new Integer(3));
          }
      }

            Assignee:
            Neal Gafter (Inactive)
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: