Overload resolution simplification
Maurizio Cimadamore
maurizio.cimadamore at oracle.com
Mon Aug 19 02:54:34 PDT 2013
On 17/08/13 02:35, Zhong Yu wrote:
> With the previous javac, when I see code `m( x->expr(x) )`, given that
> it compiles, I only need to check one version of `m` to figure out
> the type of `x`, I know that all other versions of `m` must agree on
> that type. Whether `m` is overloaded or not does not really matter to
> me in this process. So it does not increase my workload to parse the
> lambda expression if `m` is overloaded. (It does increase the workload
> of javac to verify that all versions of `m` agree on the type of `x`)
It seems like your experiments were misleading - in fact, javac used to
work even if the targets were completely unrelated, and then used errors
during lambda type-checking to do disambiguation.
Maurizio
More information about the lambda-spec-observers
mailing list