|
Relates :
|
|
|
Relates :
|
Javac incorrectly accepts this program in violation
of the spec:
class Test<S> {
void foo() {
A a = new A();
Comparable<Object> c = (Comparable<Object>)a; // Fails as expected
Comparable<S> c2 = (Comparable<S>)a; // Should fail?
}
}
final class A implements Comparable<A> {
public int compareTo(A o) {
return 0;
}
}
###@###.### 2005-05-13 15:37:27 GMT
This appears to be a specification bug so I have changed
the synopsis and reassigned the bug.
|