| Summary: | [1.8][compiler] Type annotations dropped when call is routed through a synthetic bridge method | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Srikanth Sankaran <srikanth_sankaran> | ||||
| Component: | Core | Assignee: | Andrew Clement <aclement> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jarthana, srikanth_sankaran | ||||
| Version: | 4.3 | Flags: | srikanth_sankaran:
review+
|
||||
| Target Milestone: | BETA J8 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 409235 | ||||||
| Attachments: |
|
||||||
|
Description
Srikanth Sankaran
Thanks for following up Andy. Created attachment 232314 [details]
patch to address the issue
I've taken a pass over:
1) calls to CodeStream.invoke that were not passing possibly annotated type arguments
2) calls to the old CodeStream.new_ (that does not take a typereference)
Writing testcases for these scenarios is quite tricky (and is really why addressing these situations weren't covered in the original patch). Attempting to manufacture something that will be called synthetically *and* that is also something to which you can attach type annotations is not easy.
So I've basically just reviewed all the places where the old invoke was being called and if there are type arguments, they are now passed to the new variant of invoke. In the case of new_ there is only one occurrence and it related to factory method generation (for lambdas I think) - I can't immediately see that this needs to use the new version of new_ so have left it alone.
Patch looks good - Thanks Andy. You need to sign off on this bugzilla for Jay to release it. Jay, please release and resolve once done. TIA. I forgot to mention that the patch as is does not apply. There is a conflict in the last file: CodeSnippetMessageSend. I had to manually copy over the changes. I couldn't quite understand why the patch apply fails - though. Several of Andy's patches seem to have this issue that the last file results in a conflict. Also https://bugs.eclipse.org/bugs/show_bug.cgi?id=409247 This contribution complies with http://www.eclipse.org/legal/CoO.php |