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

javac should issue the potentially ambiguous overload warning only where the problem appears

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 8
    • 8
    • tools
    • b113
    • Verified

      Javac should issue the potentially ambiguous overload warning only where the problem appears. Classes / interfaces inheriting from or implementing a warned class / interface should not be warned too.

      Example having:

          interface F1 {
              void m(String s);
          }

          interface F2 {
              void m(Integer s);
          }

      and:

      interface Foo { // warning here OK
          void m(F1)
          void m(F2)
      }

      class Bar implements Foo {} // should not be warned.

            vromero Vicente Arturo Romero Zaldivar
            vromero Vicente Arturo Romero Zaldivar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: