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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 8
    • 8, 8-repo-lambda
    • tools
    • b82

    Description

      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);
              }
      }

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: