most specific check: accept lambdas when target type is type parameter (IDEA-124725)

This commit is contained in:
Anna Kozlova
2014-05-05 17:06:34 +04:00
parent 78e9bb7840
commit 288ccfa195
3 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
import java.util.function.Supplier;
class Test {
public static void main(String... args) {
c<error descr="Cannot resolve method 'c(<lambda expression>, <lambda expression>)'">(() -> 3, () -> 10)</error>;
}
public static <T> void c(Supplier<T> s1, Supplier<T> s2) {}
public static <T> void c(Supplier<T> s1, T value) {}
}