Summary: | ecj compiles duplicate methods that javac 7 rejects | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | John Crisostomo <john.crisostomo> |
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
Status: | VERIFIED WORKSFORME | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | amj87.iitr, jarthana, john.crisostomo, srikanth_sankaran |
Version: | 3.6.1 | ||
Target Milestone: | 3.8 M4 | ||
Hardware: | PC | ||
OS: | Windows Server 2003 | ||
Whiteboard: |
Description
John Crisostomo
2010-10-12 11:33:30 EDT
This doesn't compile any longer with java 7 ver. b76. You get the following error: name clash: <R#1>forAccountSet(List<R#1>) in ChildRequestTest and <R#2>forAccountSet(List) in BaseRequestTest have the same erasure, yet neither overrides the other public static <R extends Object> ChildRequestTest<R> forAccountSet(List<R> ^ where R#1,R#2 are type-variables: R#1 extends Object declared in method <R#1>forAccountSet(List<R#1>) R#2 extends Object declared in method <R#2>forAccountSet(List) 1 error Eclipse behaviour is thus correct here. This is a dup of bug 317719. *** This bug has been marked as a duplicate of bug 317719 *** Verified for 3.7 M3 Reopening because with HEAD, we no longer report name clash error, but compile the two methods fine, resulting in an "ambiguous method" error at the call site for "forAccountSet(..)" (In reply to comment #3) > Reopening because with HEAD, we no longer report name clash error, but compile > the two methods fine, resulting in an "ambiguous method" error at the call site > for "forAccountSet(..)" As of now, on 3.8 stream top of branch, we do issue a name clash error, as does javac 7b147. We issue a secondary error about ambiguous call while javac7 does not. I think this should be closed as WORKSFORME. Ayush, do you agree ? (In reply to comment #4) > (In reply to comment #3) > > Reopening because with HEAD, we no longer report name clash error, but compile > > the two methods fine, resulting in an "ambiguous method" error at the call site > > for "forAccountSet(..)" > > As of now, on 3.8 stream top of branch, we do issue a name clash error, as does > javac 7b147. We issue a secondary error about ambiguous call while javac7 does > not. > > I think this should be closed as WORKSFORME. Ayush, do you agree ? Yup, an ambiguous call error always occurs in name clash cases. Verified for 3.8M4 with build I20111204-2000. |