-
Bug
-
Resolution: Fixed
-
P5
-
8
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.
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.