RFR 8195598: Reference to overloaded method is ambiguous with 3 methods but works with 2

Vicente Romero vicente.romero at oracle.com
Wed Jan 17 19:15:31 UTC 2018


the fix looks good,

Vicente

On 01/17/2018 10:31 AM, Maurizio Cimadamore wrote:
>
> Hi,
> this is a fix related to the most specific selection between 
> functional interfaces. The most specific functional interface analysis 
> needs access to the speculative tree determined during overload 
> resolution; such info is only available if a given argument is 
> pertinent to applicability w.r.t. a given method.
>
> Unfortunately, the fix for JDK-8154180 
> <https://bugs.openjdk.java.net/browse/JDK-8154180> introduced a single 
> shared flag called 'pertinentToApplicability' which is unset whenever 
> a given argument is found to be stuck. Now, the issue here is that the 
> flag should not be shared across all possible targets an actual is 
> checked against. That is, for each target there should be a separate 
> flag. Since the flag is shared, a single target which makes the 
> argument stuck is sufficient to make the most specific process fail, 
> even if other applicable targets were found in the process (depending 
> on the order).
>
> The solution is to use a set to keep track of the targets for which 
> the argument was NOT pertinent to applicability (e.g. stuck). This 
> brings the compiler back in sync with the spec.
>
> Webrev:
>
> http://cr.openjdk.java.net/~mcimadamore/8195598/
>
> Cheers
> Maurizio
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20180117/3e2c91d3/attachment.html>


More information about the compiler-dev mailing list