mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
GitOrigin-RevId: d4a111e2a47885ef97983979200056612db26c93
25 lines
569 B
Java
25 lines
569 B
Java
import java.util.*;
|
|
|
|
class MyTest {
|
|
void m(List<? extends F> l) {
|
|
int b = ((<warning descr="Casting 'l.get(...)' to 'F' is redundant">F</warning>) l.get(0)).i;
|
|
}
|
|
|
|
static class F {
|
|
int i;
|
|
}
|
|
|
|
List<?> getWildcard() {
|
|
return Collections.emptyList();
|
|
}
|
|
|
|
List<String> getConcrete() {
|
|
return Collections.emptyList();
|
|
}
|
|
|
|
void test() {
|
|
((<warning descr="Casting 'this' to 'MyTest' is redundant">MyTest</warning>)this).getConcrete();
|
|
((<warning descr="Casting 'this' to 'MyTest' is redundant">MyTest</warning>)this).getWildcard();
|
|
}
|
|
|
|
} |