-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Description
Version Used:
VS 2022 17.13.0 Preview 2.0
Steps to Reproduce:
start with pasting
public class Program
{
public void Main()
{
int count = 10, n = 15;
for (int metaInput = -(count + 2); metaInput < n; metaInput++)
{
for (int input2 = -(count + 2); input2 < n; input2++)
{
}
}
}
}and place the cursor on one of the metaInput references. Then rename to input1 with F2.
Expected Behavior:
Renaming doesn't touch unrelated code
Actual Behavior:
The inner for loop gets corrupted in various ways depending on which occurence of the variable you tried to rename:
for (int input2 = -(count + 2); ); input2 < n; input2++)
for (int input2 = -(count count + 2); input2 < n; input2++)
for (int (int input2 = -(count + 2); input2 < n; input2++)