mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-25 14:25:04 +07:00
missed constraint on lower bound of captured wildcard (IDEA-169083)
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
interface Processor<P> {
|
||||
void process(P t);
|
||||
}
|
||||
|
||||
class Test {
|
||||
void foo(Processor<? super List<String>> p) {
|
||||
p.process(Collections.emptyList());
|
||||
}
|
||||
|
||||
void bar(Processor<? extends List<String>> p) {
|
||||
p.process<error descr="'process(capture<? extends java.util.List<java.lang.String>>)' in 'Processor' cannot be applied to '(java.util.List<java.lang.Object>)'">(Collections.emptyList())</error>;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user