Summary: | [1.7][compiler] name clash reported in javac 1.7 and not in javac 1.6 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||||
Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> | ||||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||||
Severity: | normal | ||||||||||
Priority: | P3 | CC: | mirak63, satyam.kandula, srikanth_sankaran | ||||||||
Version: | 3.7 | ||||||||||
Target Milestone: | 3.7.1 | ||||||||||
Hardware: | PC | ||||||||||
OS: | Windows 7 | ||||||||||
Whiteboard: | |||||||||||
Attachments: |
|
Description
Olivier Thomann
2011-01-13 14:26:41 EST
Srikanth, please investigate. Created attachment 186774 [details]
Proposed fix
This seems to do the trick. Of course some existing tests are now failing in compliance 1.7. I'll attach all the test failures in compliance 1.7.
Created attachment 186775 [details]
All compiler test failures in compliance 1.7.
*** Bug 345625 has been marked as a duplicate of this bug. *** With the current patch, the following triggers an error while javac7 compiles it fine: interface I<E> { I<String> b(); } interface J<E> extends I<E> { <U> J<String> b(); } Needs to be investigated. Also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=322740. Slightly simpler case: interface I { I b(); } interface J extends I { J b(); } compiles alright, while interface I { I b(); } interface J extends I { <U> J b(); } reports a name clash, javac7 compiles both alright. *** Bug 322740 has been marked as a duplicate of this bug. *** This issue has many intertwined nuances to it. In order to preserve my sanity I'll split the issues into different bugs. I'll keep the current one for the interface name clash case and raise a separate one for the static method case and yet another for the cases reported in comment# 6 (In reply to comment #6) The Equivalent class case (abstract and concrete both) fail too. Raised bug 345947 to track this issue as it is unrelated to the current problem. >(In reply to comment #0) > Same thing applies to static methods: [...] > This code compiles using javac 1.6, but doesn't compile anymore using javac > 1.7. Raised bug 345949 to track this case. Created attachment 195734 [details] Proposed fix + tests This fixes the interface method name clash case. Also includes a junit test case for bug 322740. Fix applies for all compliance levels. But the fix is released only in BETA_JAVA7 branch and will be seen by users only via a JDK7 compatible release from Eclipse. *** Bug 342819 has been marked as a duplicate of this bug. *** Verified using Eclipse Java 7 Support(Beta) feature patch v20110623-0900. |