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

javac potentially ambiguous overload warning needs an improved scheme

    XMLWordPrintable

Details

    • b12

    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

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: