-
Bug
-
Resolution: Duplicate
-
P4
-
5.0
The following program is given an unchecked cast warning, but there should
be no warning because the cast is statically known to be safe.
class Main {
<T, U extends T, V extends T> T cond1(boolean z, U x1, V x2) {
return (z? (T) x1: x2);
}
}
be no warning because the cast is statically known to be safe.
class Main {
<T, U extends T, V extends T> T cond1(boolean z, U x1, V x2) {
return (z? (T) x1: x2);
}
}
- duplicates
-
JDK-4916620 legal cast is rejected
- Closed