Community
Participate
Working Groups
Build Identifier: I20100608-0911 Compile class with two methods with params List<X> and List<Y> respectively, and distinct return types. This works with javac (1.6.0_21), but Eclipse complains. If I change the return type to be the same, then javac complains too (as now the erased method signatures really are identical). Reproducible: Always Steps to Reproduce: Compile this class in Eclipse: import java.util.ArrayList; import java.util.List; public class EclipseBugDemo { public static boolean foo(List<String> x) {return true;} public static int foo(List<Integer> x) {return 1;} }
Another duplicate of bug 289247?
Brought about by the changes made in bug# 289247 ; Closing as a duplicate of bug# 317719 The sample code fails to compile with JDK7: C:\jtests>C:\jdk-7-ea-bin-b100-windows-i586-09_jul_2010\jdk7\bin\javac -Xlint:un checked -Xlint:rawtypes -Xlint:deprecation -sourcepath c:\jtests EclipseBugDemo. java EclipseBugDemo.java:6: name clash: foo(List<Integer>) and foo(List<String>) have the same erasure public static int foo(List<Integer> x) {return 1;} ^ 1 error *** 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