|
Relates :
|
The following cast is safe yet we give a warning:
class X {
interface CF<S> { }
interface CG<T> { }
static class CH<S, T> implements CF<S>, CG<T> { }
interface CI<S> extends CF<S> { }
interface CJ<T> extends CG<T> { }
interface CK<S, T> extends CI<S>, CJ<T> { }
void f() {
Object o = (CH<String, Integer>) (CK<String, Integer>) null; // <<pass>> <<todo: cast-infer>>
}
}
|