Community
Participate
Working Groups
Build Identifier: I20100608-0911 Consider the three types: public interface Interface1<T> { public void hello(T greeting); } public interface Interface2<T> { public int hello(T greeting); } public class ErasureTest implements Interface1<String>, Interface2<Double> { public void hello(String greeting) { } public int hello(Double greeting) { return 0; } } The Eclipse 3.6 compiler fails to compile ErasureTest while the Oracle Java 6 compiler and OpenJDK 7 compiler do. Reproducible: Always
I believe the code is valid and eclipse behavior is not. I'll investigate.
See also bug# 322001
I have verified that this is a duplicate of bug 322001. The fix I have developed for the latter bug also addresses this issue. I will use the test case here to generate a unit test for the the other bug. Closing this as a duplicate of bug 322001 rather than the other way about since there is a lot of discussion on the other thread. *** This bug has been marked as a duplicate of bug 322001 ***
Verified for 3.6.1 using build M20100825-0800. I haven't reset the Whiteboard intentionally as I think it would be safe to also verify this test case in HEAD stream (it's slightly different than the test case of bug 322001 comment 0...)
Verified for 3.7M2 using build I20100909-1700.