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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8, 8-repo-lambda
    • Fix Version/s: 8
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: