mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
15 lines
366 B
Java
15 lines
366 B
Java
class A {
|
|
static class B<T> {
|
|
int foo(T x) {return 0;}
|
|
}
|
|
public static void main(String[] args) {
|
|
B<? extends CharSequence> q = new B<>();
|
|
|
|
Func x = q::<error descr="Incompatible types: CharSequence is not convertible to capture of ? extends CharSequence">foo</error>;
|
|
x.invoke("");
|
|
}
|
|
|
|
interface Func {
|
|
int invoke(CharSequence x);
|
|
}
|
|
} |