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

overloading versus super.f(args) versus interfaces

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.2
    • Fix Version/s: None
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      solaris_8

      Description

      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!
          }
      }

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: