isApplicability check based on pertinentToApplicability

This commit is contained in:
Anna Kozlova
2015-11-30 15:11:41 +01:00
parent d84e18ec58
commit 621795bbee
24 changed files with 47 additions and 33 deletions
@@ -12,7 +12,7 @@ class MS {
void test(boolean cond) {
m(cond ? () -> 26 : () -> 24);
<error descr="Cannot resolve method 'm(?)'">m</error>(cond ? () -> 26 : () -> new Integer(42));
<error descr="Ambiguous method call: both 'MS.m(GetInt)' and 'MS.m(GetInteger)' match">m</error>(cond ? () -> 26 : () -> new Integer(42));
m(cond ? () -> new Integer(26) : () -> new Integer(42));
}
}
@@ -3,7 +3,7 @@ import java.util.function.Supplier;
class Test {
public static void main(String... args) {
<error descr="Cannot resolve method 'c(<lambda expression>, <lambda expression>)'">c</error>(() -> 3, () -> 10);
<error descr="Ambiguous method call: both 'Test.c(Supplier<Integer>, Supplier<Integer>)' and 'Test.c(Supplier<T>, T)' match">c</error>(() -> 3, () -> 10);
}
public static <T> void c(Supplier<T> s1, Supplier<T> s2) {}