Java 8 Consumer/Function Lambda Ambiguity
This line is definitely ambiguous: doStuff(getPattern(x -> String.valueOf(x))); Reread this from the linked JLS chapter: A lambda expression (§15.27) is potentially compatible with a functional interface type (§9.8) if all of the following are true: The arity of the target type’s function type is the same as the arity of the lambda expression. If the … Read more