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

overloading versus super.f(args) versus interfaces

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.4.2
    • specification
    • generic
    • solaris_8

      javac fails to reject the following code, which has an ambiguity according
      the the Java Language Specification, second edition.


      // narrowed down from jacks 15.12.2.2-ambiguous-18

      class A {
          protected void m(Object o, String s) {}
      }
      interface B {
          void m(String s, Object o);
      }
      abstract class C extends A implements B {}
      abstract class D extends C {
          void foo() {
              super.m("", ""); // ambiguous!
          }
      }

            gbrachasunw Gilad Bracha (Inactive)
            gafter Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: