Stream.flatMap reference ambiguity

Dan Smith daniel.smith at
Wed Feb 27 11:11:32 PST 2013

On Feb 26, 2013, at 5:42 PM, Zhong Yu <zhong.j.yu at> wrote:

> What I'm confused about is that the sentence sounds like it's ok to
> overload with functional interfaces that have _same_ parameter types.
> Or is that just outright nonsense? So did you simply mean "no overload
> with functional interfaces of the same arity"?

Same parameter types, different returns.  See, for example,  The overload resolution logic is able to disambiguate based on what gets returned.  (That's a much easier problem that trying to choose the best types for lambda parameters based on an arbitrary block of code.)


More information about the lambda-dev mailing list