Project: JDT
Bug 163121 [quick assist] "Convert to enhanced for loop" proposes existing name "element"
Reported: 2006-11-01 14:38:28 | Status: resolved fixed

I20061101-0800 "Convert to enhanced for loop" proposes existing name "element", causing compile errors: void foo(Object[] x, Object[] y) { for (int i= 0; i < y.length; i++) for (int j= 0; j < x.length; j++) System.out.println(y[i]); } - convert outer for - convert inner for => result: void foo(Object[] x, Object[] y) { for (Object element : y) for (Object element : x) System.out.println(element); }

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ConvertForLoopQuickFixTest.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertForLoopOperation.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/ConvertLoopFix.java