| Summary: | [1.5][compiler] name clash should be reported when inherited methods have the same erasure | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | VERIFIED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | satyam.kandula |
| Version: | 3.7 | ||
| Target Milestone: | 3.7.1 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
bug 334306 has a candidate patch. *** This bug has been marked as a duplicate of bug 334306 *** Verified using Eclipse Java 7 Support(Beta) feature patch v20110623-0900. |
This code used to compile using Eclipse or javac 1.6, but it now fails with javac 1.7: class A<T> {} interface I { void foo(A<String> a); } interface J extends I { void foo(A<Integer> a); } The Eclipse compiler would report name clash errors as soon as the interface J is implemented by a class as there is no way to implement both foo methods. Looking at 9.4.1 in the JLS, this seems to be a bug. So we might want to fix it for all compliances.