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

Lambda Spec: Allow 'static' flag to impact method reference resolution

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8
    • Component/s: specification
    • Labels:
    • Subcomponent:
    • Verification:
      Verified

      Description

      Method references are specified (0.6.2 Lambda Spec) to be resolved without regard to the 'static' flag of the candidate method(s). This is highly unintuitive and leads to spurious errors, especially when unbound method references ("String::substring") are used. Most people do not understand it, or even account for it in their mental model.

      Without violating the spirit of method resolution (which allows, for example, a static method to "shadow" an instance method), method reference resolution should be more intelligent.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dlsmith Dan Smith
              Reporter:
              dlsmith Dan Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: