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

15.13.1: Clarify wording of static vs. non-static disambiguation

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P5
    • 9
    • 8
    • specification

    Description

      A method reference of the form 'TypeName::m' may refer to a static method or an instance method; the meaning is disambiguated by performing two method searches, one at arity n and one at arity n-1, and examining the results.

      The 15.13.1 text is unclear about what constitutes "the results" of these searches. We have this claim: "Each search may produce a method or, in the case of an error, ... no result." But later the logic relies on i) the produced (most-specific) method, if any, and ii) the static-ness of the full set of applicable methods. Since (ii) isn't identified as a result of the search, it's sort of a side-effect; this disconnect can lead to some further confusion.

      Suggested fix: identify both the most-specific method and the set of applicable methods as "results" of each search, and be precise about which is being referred to in the later analysis.

      Attachments

        Activity

          People

            abuckley Alex Buckley
            dlsmith Dan Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: