Community
Participate
Working Groups
Since Eclipse 3.1 M6 code like the following won't compile anymore: public class Test<T extends Object> { public class InnerClass implements Comparable<T> { public int compareTo(T other) { return -1; } } public static void main(String[] args) { InnerClass a = new InnerClass(); InnerClass b = new InnerClass(); // The following line does not compile (anymore): a.compareTo(b); } }
This code doesn't compile with javac.
Indeed, this code shouldn't be accepted. We tightened semantics since M4. Added negative test: GenericTypeTest#test570