Javac does not correctly implement wildcards removal from functional interfaces

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: None
    • Component/s: tools
    • b99
    • Verified

      This program fails to compile:

      class Test {
          interface I<R extends Runnable, T> {
               void m();
          }

          {
              I<? extends O, String> succeed = this::ff; //ok
              I<? extends Comparable<String>, String> failed = this::ff; //error
          }

          interface O {}
          private void ff(){}
      }

            Assignee:
            Maurizio Cimadamore
            Reporter:
            Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: