mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
IDEA-124019
This commit is contained in:
+1
-1
@@ -7,6 +7,6 @@ abstract class B {
|
||||
}
|
||||
|
||||
void foo(Class<?> aClass) {
|
||||
A a = <error descr="Inferred type '?' for type parameter 'T' is not within its bound; should extend 'A'">getA(aClass)</error>;
|
||||
A a = <error descr="Inferred type 'capture<?>' for type parameter 'T' is not within its bound; should extend 'A'">getA(aClass)</error>;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class Sample {
|
||||
private <T> void collectClassInformation(java.util.Set<Class<? extends T>> classes) throws Exception {
|
||||
for (Class<? extends T> root : classes) {
|
||||
collectClassInformation<error descr="'collectClassInformation(java.util.Set<java.lang.Class<? extends T>>)' in 'Sample' cannot be applied to '(java.util.Set<java.lang.Class<capture<? extends T>>>)'">(getSubTypesOf(root))</error>;
|
||||
}
|
||||
}
|
||||
|
||||
public <T> java.util.Set<Class<? extends T>> getSubTypesOf(Class<T> type) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -9,8 +9,8 @@ class B<L> {
|
||||
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>;
|
||||
baz<error descr="'baz(A<capture<?>,capture<?>>)' in 'B' cannot be applied to '(A<capture<?>,capture<?>>)'">(foo)</error>;
|
||||
baz<error descr="'baz(A<capture<?>,capture<?>>)' in 'B' cannot be applied to '(A<capture<?>,capture<?>>)'">(foo1)</error>;
|
||||
}
|
||||
|
||||
<K> void baz(A<K, K> a) {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
class C<T extends C<? extends C<? extends T>>>{
|
||||
void foo(C<?> x){
|
||||
<error descr="Inferred type '? extends C<? extends C<capture<?>>>' for type parameter 'T' is not within its bound; should extend 'C<? extends C<? extends C<capture<?>>>>'">bar(x)</error>;
|
||||
<error descr="Inferred type 'capture<? extends C<? extends C<capture<?>>>>' for type parameter 'T' is not within its bound; should extend 'C<capture<? extends C<? extends C<capture<?>>>>>'">bar(x)</error>;
|
||||
}
|
||||
<T extends C<? extends T>> void bar(C<T> x){}
|
||||
}
|
||||
+5
-5
@@ -87,7 +87,7 @@ class CaptureTest {
|
||||
}
|
||||
|
||||
void foo (Class<? extends Emum<CaptureTest>> clazz) {
|
||||
<error descr="Inferred type '? extends CaptureTest.Emum<CaptureTest>' for type parameter 'T' is not within its bound; should extend 'CaptureTest.Emum<? extends CaptureTest.Emum<CaptureTest>>'">Emum.valueOf(clazz, "CCC")</error>;
|
||||
<error descr="Inferred type 'capture<? extends CaptureTest.Emum<CaptureTest>>' for type parameter 'T' is not within its bound; should extend 'CaptureTest.Emum<capture<? extends CaptureTest.Emum<CaptureTest>>>'">Emum.valueOf(clazz, "CCC")</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ class S1 {
|
||||
}
|
||||
|
||||
void bar(List<? extends S1> k) {
|
||||
f<error descr="'f(java.util.List<S1>, S1)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, S1)'">(k, k.get(0))</error>;
|
||||
f<error descr="'f(java.util.List<capture<? extends S1>>, capture<? extends S1>)' in 'S1' cannot be applied to '(java.util.List<capture<? extends S1>>, S1)'">(k, k.get(0))</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ class S2 {
|
||||
}
|
||||
|
||||
void bar(List<? extends S2> k) {
|
||||
f<error descr="'f(java.util.List<T>, java.util.List<T>)' in 'S2' cannot be applied to '(java.util.List<capture<? extends S2>>, java.util.List<capture<? extends S2>>)'">(k, k)</error>;
|
||||
f<error descr="'f(java.util.List<capture<? extends S2>>, java.util.List<capture<? extends S2>>)' in 'S2' cannot be applied to '(java.util.List<capture<? extends S2>>, java.util.List<capture<? extends S2>>)'">(k, k)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ class S3 {
|
||||
}
|
||||
|
||||
void bar(Map<? extends S3, ? extends S3> k) {
|
||||
f<error descr="'f(java.util.Map<T,T>)' in 'S3' cannot be applied to '(java.util.Map<capture<? extends S3>,capture<? extends S3>>)'">(k)</error>;
|
||||
f<error descr="'f(java.util.Map<capture<? extends S3>,capture<? extends S3>>)' in 'S3' cannot be applied to '(java.util.Map<capture<? extends S3>,capture<? extends S3>>)'">(k)</error>;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ public static void foo(List<? extends Foo> foos) {
|
||||
class OtherBug1 {
|
||||
public static void foo(List<? super Foo> foos) {
|
||||
final Comparator<Foo> comparator = createComparator();
|
||||
Collections.sort<error descr="'sort(java.util.List<T>, java.util.Comparator<? super T>)' in 'java.util.Collections' cannot be applied to '(java.util.List<capture<? super OtherBug1.Foo>>, java.util.Comparator<OtherBug1.Foo>)'">(foos, comparator)</error>;
|
||||
Collections.sort<error descr="'sort(java.util.List<capture<? super OtherBug1.Foo>>, java.util.Comparator<capture<? super OtherBug1.Foo>>)' in 'java.util.Collections' cannot be applied to '(java.util.List<capture<? super OtherBug1.Foo>>, java.util.Comparator<OtherBug1.Foo>)'">(foos, comparator)</error>;
|
||||
}
|
||||
|
||||
private static Comparator<Foo> createComparator() {
|
||||
|
||||
Reference in New Issue
Block a user