Community
Participate
Working Groups
In the following program... ========== int main() { int a; char myinput='a'; switch (myinput) { case 'a': a=5; // select a break; } return 0; } ========== If you select 'a' on line 8, and invoke the Extract Local Variable refactoring, CDT produces the following incorrect code: ========== int main() { int a; char myinput='a'; switch (myinput) { case 'a': int extracted_variable = a; extracted_variable = 5; // select a break; } return 0; } ========== Only statements can execute after case 'a', there should not be any declaration.