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

javac potentially ambiguous overload warning needs an improved scheme

    Details

      Description

      At present javac don't fire a potentially ambiguous warning in the following cases:

      interface I {
          void foo(Consumer<Integer> c);
      }

      interface J {
          void foo(IntConsumer c);
      }

      interface K extends I, J { }

      --

      interface I<T> {
          void foo(Consumer<Integer> c);
          void foo(T c);
      }

      interface J extends I<IntConsumer> { }

      The current implementation should be improved to cover these cases too.

      Consider implementing a combo test to check the scheme implementation.

        Attachments

          Activity

            People

            • Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              vromero Vicente Arturo Romero Zaldivar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: