Community
Participate
Working Groups
Eclipse 3.2RC4 for Win23: eclipse-SDK-3.2RC4-win32.zip Running on Windows XP SP2 public class Test { public static void main(String[] args) { int x = 2; if (true) { int x = 4; } } } "x = 4" is underlined with multiple markers: "The assignment to variable x has no effect", and "Duplicate local variable x". I believe that the first one is incorrect ("has no effect").
Reproduced in latest. This is a case where the local binding is null (since duplicate) and no binding is extracted for the right hand side expression, which makes it (incorrectly) think of null==null then has no effect.
Added LocalVariableTest#test011-012. Releasing fix for 3.2.1.
Released for 3.2.1 Released for 3.3 M1 while merging TARGET_321 in HEAD
I guess this fix made our RenameTempTests#testFail32() fail. However, the new behavior is much better than the old (duplicate local variable declarations introduce separate ILocalVariables, and references always map to the most recently declared variable). I removed the obsolete testFail32() and added a regression tests for the new behavior in HEAD. NOTE: I don't see the fix in the R3_2_maintenance stream so far, so I think this bug should not yet be marked as fixed in 3.2.1. When the fix is released to the 3.2.1 branch, we also need to adapt the jdt.ui test to avoid the same failure.
Markus, TARGET_321 is currently our 3.2.1 maintenance stream as R3_2_maintenance is frozen until 3.2.0 is declared. When done, TARGET_321 stream will be merged in R3_2_maintenance one and we will be back to "normal". So, if you want to get current 3.2.1 fixes, you need to import TARGET_321 branch of org.eclipse.jdt.core project in your workspace...
OK, sorry for the confusion. Our test failure does not occur with TARGET_321, although I can confirm that this bug is fixed in that branch. I now guess our test failure was caused by the fix for 144858, which is only for 3.3M1.
Verified for 3.3 M1 using build I20060807-2000.
Verified for 3.2.1 using build M20060908-1655