Parametrized method and cyclic inference
Dan Smith
daniel.smith at oracle.com
Fri Nov 2 15:23:13 PDT 2012
On Nov 2, 2012, at 2:19 PM, Sam Pullara <sam at sampullara.com> wrote:
> I've run into this case a lot when building things. I would love it if it were fixed.
Can you be more specific about "this case"? Does it look more like this (something we've developed a good solution for):
Predicate<String> ps = Predicate.and(x -> !x.isEmpty(), x -> x.matches("foo.*"));
Or this (Remi's example):
Set<Runnable> sr = Collections.singleton(() -> System.gc());
(The difference being that a functional interface appears in the declaration of 'and', but not in the declaration of 'singleton'.)
—Dan
More information about the lambda-spec-experts
mailing list