| Summary: | Errors when use two or more methods with different generic parameters | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Vladimir <vladimir.mk.ua> |
| Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
| Status: | VERIFIED INVALID | QA Contact: | |
| Severity: | major | ||
| Priority: | P3 | CC: | amj87.iitr, Olivier_Thomann, srikanth_sankaran, vladimir.mk.ua |
| Version: | 3.7 | ||
| Target Milestone: | 3.7.1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 317719 *** junit has been added as a part of the fix for bug 317719 I think this was wrongly marked as dup. This is invalid because the given code neither compiles with java6 nor with java7. (and hence also not with ECJ in 1.6 or 1.7 compliances). Verified using build M20110824-0800. |
Build Identifier: 20100917-0705 The test code: import java.util.List; public class TestMain { public String getInfo(List<String> data) { return ""; } public String getInfo(List<Integer> data) { return ""; } } Eclipse doesn't compiles the code and outputs the error: "Method getInfo(List<Integer>) has the same erasure getInfo(List<E>) as another method in type TestMain" However java and Idea compile the code fine. Reproducible: Always Steps to Reproduce: 1. Write the code: import java.util.List; public class TestMain { public String getInfo(List<String> data) { return ""; } public String getInfo(List<Integer> data) { return ""; } } 2. Try to run or compile it.