-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b104
-
Verified
This program fails to compile after JDK-JDK-8147493:
abstract class Test {
interface R<E> {}
interface Q<T> {}
interface T { <E> Q<E> n(R<E> r); }
abstract <T> T isA(Class<T> t);
abstract <T> S<T> w(T t);
interface S<T> { S<T> t(T value); }
void f(T t, Q<String> q) {
w(t.n(isA(R.class))).t(q);
}
}
error: incompatible types: Q<String> cannot be converted to Q<Object>
w(t.n(isA(R.class))).t(q);
abstract class Test {
interface R<E> {}
interface Q<T> {}
interface T { <E> Q<E> n(R<E> r); }
abstract <T> T isA(Class<T> t);
abstract <T> S<T> w(T t);
interface S<T> { S<T> t(T value); }
void f(T t, Q<String> q) {
w(t.n(isA(R.class))).t(q);
}
}
error: incompatible types: Q<String> cannot be converted to Q<Object>
w(t.n(isA(R.class))).t(q);
- relates to
-
JDK-8147493 regression when type-checking unchecked method calls
-
- Closed
-