mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
ensure assignability for standalone expressions during applicability check (IDEA-159086)
This commit is contained in:
+18
@@ -0,0 +1,18 @@
|
||||
|
||||
import java.util.*;
|
||||
|
||||
class Test {
|
||||
interface Q<K> {
|
||||
}
|
||||
|
||||
void f(List list, Set<List<Object>> q) {
|
||||
assertThat1(list, <error descr="'assertThat1(java.util.List, java.util.Set<? super java.util.List>)' in 'Test' cannot be applied to '(java.util.List, java.util.Set<java.util.List<java.lang.Object>>)'">q</error>);
|
||||
assertThat2(list, q);
|
||||
assertThat<error descr="Cannot resolve method 'assertThat(java.util.List, java.util.Set<java.util.List<java.lang.Object>>)'">(list, q)</error>;
|
||||
}
|
||||
|
||||
private static <T> void assertThat1(T actual, Set<? super T> matcher) {}
|
||||
private static <T> void assertThat2(T actual, Set<? extends T> matcher) {}
|
||||
private static <T> void assertThat(T actual, Set<? super T> matcher) {}
|
||||
private static <T> void assertThat(T actual, List<? super T> matcher) {}
|
||||
}
|
||||
+1
-1
@@ -9,6 +9,6 @@ class Calls {
|
||||
void foo(Function<String, Optional> computable) {}
|
||||
|
||||
{
|
||||
<error descr="Not a statement">((x) -> a(b(c(x))));</error>
|
||||
((x) -> a(b(c<error descr="'c(C)' in 'Calls' cannot be applied to '(<lambda parameter>)'">(x)</error>)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user