Duplicate :
|
|
Relates :
|
|
Relates :
|
See also specification bug 6559178. Also, it feels that the following (up)cast scenario should be flagged as unchecked: public class X<R> { static interface Interface extends Comparable<String> {} static final class Implements implements Interface { public int compareTo(String o) { return 0; } } void method() { ((Comparable<R>) new Implements()).toString(); // unchecked ? } }