Community
Participate
Working Groups
The following code generates an error with Sun's javac but Eclipse JDT compiles it without reporting an error: --- 8< --- import java.util.Collection; public class CompilerBug { public int foo(Collection bar) { return 0; } public double foo(Collection<String> bar) {return 0; } } --- 8< --- alblue:tmp alex$ javac CompilerBug.java CompilerBug.java:5: foo(java.util.Collection) is already defined in CompilerBug public double foo(Collection<String> bar) {return 0; } ^ 1 error Note that making the first method a generic type (like Collection<Double>) results in it compiling fine in both Eclipse and javac.
Added MethodVerifyTest test200 in HEAD *** This bug has been marked as a duplicate of bug 289247 ***