Missing method reference lookup error when unbound search finds a static method

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 8
    • Affects Version/s: 8, 8-repo-lambda
    • Component/s: tools
    • b82

      This program should not compile:

      interface I {
        void zoo(Y y, String s);
      }

      class Y {
              void zoo(String s) {
                      System.out.println("Y.zoo(String)");
              }
              void zoo(Y y, String s) {
                      System.out.println("Y.zoo(Y, String)");
              }
      }


      public class X {
          public static void main(String[] args) {
                  I i = Y::zoo;
                  i.zoo(null, null);
              }
      }

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

              Created:
              Updated:
              Resolved: