Summary: | [1.5][compiler]Do not detect duplicate constructors in a ParameterizedType | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Kent Johnson <kent_johnson> | ||||
Component: | Core | Assignee: | Kent Johnson <kent_johnson> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | adamrabung, philippe_mulet | ||||
Version: | 3.3 | Flags: | philippe_mulet:
review+
Olivier_Thomann: review+ |
||||
Target Milestone: | 3.3 RC2 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Kent Johnson
2007-05-24 11:43:28 EDT
Created attachment 68657 [details]
Proposed patch
Philippe - this is fairly straight forward if you want to add it to 3.3 instead of 3.3.1 The fix looks good (actually exact same fix as for #getExactMethod). One nit in the patch, Kent, you introduce an extraneous semicolon (empty statement). I would take it for 3.3 since it is a trivial change. Out of curiousity, why don't we also get a complaint for constructor collision, like we do for methods: In following case, no complaint is emitted against constructors, but are emitted against methods. class SuperX<T> { SuperX(String s) {} SuperX(T t) {} void foo(String s) {} void foo(T t) {} } public class X extends SuperX<String> { } Re: comment 4 javac doesn't complain either about constructor collision... +1 Let's try for rc2 then. Kent - can you also add a test for comment#4 ? I saw the semicolons after I posted the patch. Added the additional test to show duplicate constructors do not report an error, but any call to them is reported as ambiguous. Released into HEAD for 3.3RC2 Verified for 3.3RC2 using I20070525-1350. |