[java] [overload resolution] actively prune lambdas with wrong number of parameters (IDEA-279558)

GitOrigin-RevId: e6fdb4b920ec38c8f51cef14c33bc2c26321dd09
This commit is contained in:
Anna Kozlova authored and intellij-monorepo-bot committed 2021-10-05 19:12:50 +00:00
1 parent 6698b10397
commit 1b3bddda3b
4 files changed
+60 -49

No files matched your search

@@ -0,0 +1,17 @@
package p;
import java.util.function.BiFunction;
import java.util.function.Predicate;
class MyTest {
void m(Predicate<String> p) {}
void m(BiFunction<String, Integer, String> f) {}
{
m((s, i) -> {//m should be resolved here
if (s.equals("a")) {
}
<error descr="Missing return statement">}</error>);
}
}