mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-24 09:20:53 +07:00
- skip methods to capture parameters GitOrigin-RevId: df0c152d33bb9f880dad2428b7635d06209b3e0c
23 lines
506 B
Java
23 lines
506 B
Java
class C<A> {
|
|
static <T> Object foo(Object x) {
|
|
class Local {
|
|
}
|
|
return (x instanceof Local) ? x : new Local();
|
|
}
|
|
|
|
static <T> Object foo2(Object x) {
|
|
class Local<T> {
|
|
}
|
|
return (x instanceof Local) ? x : new Local();
|
|
}
|
|
|
|
Object foo3(Object x) {
|
|
class Local {
|
|
}
|
|
return (x instanceof <error descr="Illegal generic type for instanceof">Local</error>) ? x : new Local();
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
System.out.println(C.<Integer>foo(""));
|
|
}
|
|
} |