Community
Participate
Working Groups
Build Identifier: I20100608-0911 overloading a static generic method doesn't work any more. It works in javac 1.6 and eclipse 3.5 Reproducible: Always Steps to Reproduce: compile: import java.util.List; public class CovarReturnTest { public static String doIt(final List<String> arg) { return "1"; } public static CharSequence doIt(final List<CharSequence> arg) { return "2"; } }
I believe this was a bug in java 6 which got fixed in java 7. See that this test case doesnt compile with java 7 (b76), giving an error "name clash.... same erasure". Eclipse compiler also gives the same error and is thus compatible with javac and also JLS3 - 8.4.3. Srikanth, whats your take?
(In reply to comment #1) > I believe this was a bug in java 6 which got fixed in java 7. See that this > test case doesnt compile with java 7 (b76), giving an error "name clash.... > same erasure". Eclipse compiler also gives the same error and is thus > compatible with javac and also JLS3 - 8.4.3. > Srikanth, whats your take? Yes, this is a duplicate of bug 317719 *** This bug has been marked as a duplicate of bug 317719 ***
Verified for 3.7M1
junit has been added as a part of the fix for bug 317719
Verified for 3.7.1 RC2 using build M20110824-0800
Verified for 3.8M2 using build I20110912-0800