mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
do not create another capture when not necessary; capture should be the same when substitutor define such dependency (IDEA-57340; IDEA-5731)
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
class A<T, S> {
|
||||
}
|
||||
|
||||
class B<L> {
|
||||
A<L, L> foo() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void bar(B<?> b, A<?, ?> foo1) {
|
||||
baz(b.foo());
|
||||
A<?, ?> foo = b.foo();
|
||||
baz<error descr="'baz(A<K,K>)' in 'B' cannot be applied to '(A<capture<?>,capture<?>>)'">(foo)</error>;
|
||||
baz<error descr="'baz(A<K,K>)' in 'B' cannot be applied to '(A<capture<?>,capture<?>>)'">(foo1)</error>;
|
||||
}
|
||||
|
||||
<K> void baz(A<K, K> a) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class C<T,S>{}
|
||||
class D<T> extends C<T,T> {
|
||||
void foo(D<?> x){ bar(x); }
|
||||
<T> void bar(C<T,T> x){}
|
||||
}
|
||||
@@ -134,6 +134,7 @@ public class GenericsHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
public void testIDEA72912() throws Exception {doTest(false);}
|
||||
public void testIllegalGenericTypeInInstanceof() throws Exception {doTest(false);}
|
||||
public void testIDEA57339() throws Exception {doTest(false);}
|
||||
public void testIDEA57340() throws Exception {doTest(false);}
|
||||
|
||||
public void testJavaUtilCollections_NoVerify() throws Exception {
|
||||
PsiClass collectionsClass = getJavaFacade().findClass("java.util.Collections", GlobalSearchScope.moduleWithLibrariesScope(getModule()));
|
||||
|
||||
Reference in New Issue
Block a user