-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
5.0
-
generic
-
solaris_8
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>>
}
}
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>>
}
}
- relates to
-
JDK-4916620 legal cast is rejected
-
- Closed
-