| Summary: | Fup of bug 289247: Investigate validity of the fix vis-a-vis JLS. | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Ayushman Jain <amj87.iitr> | ||||||||||
| Component: | Core | Assignee: | Ayushman Jain <amj87.iitr> | ||||||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||||||
| Severity: | normal | ||||||||||||
| Priority: | P3 | CC: | jarthana, Olivier_Thomann, satyam.kandula, srikanth_sankaran | ||||||||||
| Version: | 3.7 | Flags: | srikanth_sankaran:
review+
|
||||||||||
| Target Milestone: | 3.7.1 | ||||||||||||
| Hardware: | All | ||||||||||||
| OS: | All | ||||||||||||
| Whiteboard: | |||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Ayushman Jain
Srikanth, the patch in bug 317719 comment 50 is a step towards rectifying this. You can see how valid that is. Created attachment 201561 [details] proposed fix v0.5 + updated tests The LS 8.4.2 says that The signature of a method m1 is a subsignature of the signature of a method m2 if either: • m2 has the same signature as m1, or • the signature of m1 is the same as the erasure of the signature of m2. It seems that the logic for point 2 is the only thing which currently distinguishes ECJ compliance 1.6 behaviour with javac6. This patch adds that logic, special cased for 1.6 compliance. This is on the lines of the logic we also had before fix for bug 289247 deleted it. Created attachment 201564 [details] proposed fix v1.0 + updated tests This patch adds some more logic that was removed after the fix for bug 289247. So, now we're more closely compatible with javac6 and many cases where we were being more liberal than javac6 due to the fix for bug 317719 now agree with javac6. Cases such as these also complain now: int foo() {return 1;} float foo() {return 1.0;} Created attachment 201587 [details]
Revised patch under test
Same patch with minor clean ups.
Created attachment 201611 [details]
Proposed patch - Passes all tests.
I think this patch correctly restores the fragment of the code deleted by bug 289247 and in combination with the fix for bug 317719, effectively restores the behavior at compliance level 1.6 to how it stood before the combination of fixes for the bug 289247 and bug 273862. Thanks Ayush. +1 for the patch. Please release for HEAD and 3.7.1. Thanks Srikanth. Released in HEAD for 3.8M2 and in R3_7_maintenance for 3.7.1 Verified for 3.7.1 RC2 using build M20110824-0800 Verified for 3.8M2 with build I20110912-2126. |