Community
Participate
Working Groups
3.1M3 test pass The following class gets compiled without errors: public class K implements Comparable<K> { public int compareTo(Object o) { return 0; } public int compareTo(K o) { return 1; } } The class file gets 3 methods: - public int compareTo(Object arg); - public int compareTo(K arg); - public bridge synthetic int compareTo(Object arg); Using the class with ... class User { public static void main(String[] args) { K k= new K(); k.compareTo(new K()); } } ... gives a classloader exception: Exception in thread "main" java.lang.ClassFormatError: Repetitive method name/signature in class file k/K javac1.5.0 resists to compile the source: name clash: compareTo(java.lang.Object) in k.K and compareTo(T) in java.lang.Comparable<k.K> have the same erasure, yet neither overrides the other
Added MethodVerify test 18
*** Bug 79250 has been marked as a duplicate of this bug. ***
Verified in 200412140800. Now we report an error compiling K.
New Gerrit change created: https://git.eclipse.org/r/78302