mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 20:42:52 +07:00
captures: distinguish by type parameters in method return type evaluation context
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
class B<S, M> {}
|
||||
abstract class A<T> {
|
||||
<K> void baz(B<K, K> a) {}
|
||||
abstract B<?, ?> foo();
|
||||
void bar(A<?> a) {
|
||||
baz<error descr="'baz(B<capture<?>,capture<?>>)' in 'A' cannot be applied to '(B<capture<?>,capture<?>>)'">(a.foo())</error>;
|
||||
}
|
||||
}
|
||||
@@ -442,6 +442,10 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false);
|
||||
}
|
||||
|
||||
public void testDistinguishWildcardCapturesAlsoByMethodCalls() throws Exception {
|
||||
doTest(LanguageLevel.JDK_1_7, JavaSdkVersion.JDK_1_7, false);
|
||||
}
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
assertNotNull(collectionsClass);
|
||||
|
||||
Reference in New Issue
Block a user