Summary: | Valid code fails to compile in 3.6 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Michael Valenta <Michael.Valenta> | ||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | amj87.iitr, jarthana, martinae, Olivier_Thomann, pwebster, remy.suen | ||||
Version: | 3.5 | ||||||
Target Milestone: | 3.6 M7 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Michael Valenta
2010-04-06 13:36:24 EDT
This is a consequence of the null analysis changes. yourList is seen as always not null. so yourList != null is always true. So the generation of myList in the conditional expression is tagged as FAKE_USED and UNREACHABLE. Once this is done, the emulated synthetic field is not created for myList and leads to the error you saw. I have a fix under testing. Thanks for the report. In the original code I saw this in, yourList may have been null as it was the result of a method call so you may want to verify that case as well. Created attachment 164037 [details]
Proposed fix + regression test
Released for 3.6M7. org.eclipse.jdt.core.tests.compiler.regression.InnerEmulationTest#test173 org.eclipse.jdt.core.tests.compiler.regression.InnerEmulationTest#test174 *** Bug 309237 has been marked as a duplicate of this bug. *** verified for 3.6M7 using build I20100424-2000. Verified. |