lambda syntax tutorial
nathan.bryant at linkshare.com
Thu Aug 5 11:08:41 PDT 2010
Kevin Bourrillion wrote:
Ø For example, if Foo#bar has no contextual smarts at all, then adding overload #2 of any method would always be source-incompatible (which would be hideous!). So how much intelligence does it have?
The worst-case of overloading always producing breakage can be ruled out; the set of possible overloads can only include those that have SAM types that are compatible with any of the overloads of Foo#bar .
From there, resolution should proceed in the usual way (most specific wins, or else the programmer must disambiguate.)
In order for the worst ambiguities to arise, Foo.bar and the target method must both be overloaded. Is this really that common of a case? Any lesser ambiguities are the ones that can also arise with the lambda parameter type inference that is already implemented.
More information about the lambda-dev