Why is Introduce Local (Replace All) allowed in certain circumstances

Yesterday I had a repeat of my whole day presentation “What’s new in Visual Studio 2005/.net 2” and the audience was great. Note: you can find the slides here. I was asked few questions which I promised to answer later because I didn’t know them on the spot (yes, yes, I know). So, here is the first question answered:


Why is R! (both free refactor that comes with VB.NET and R! Pro) allowing Introduce Local (Replace All) operation on Double.Parse(TextBox1.Text) in the following situation:


After the Introduce Local (Replace All) operation we get this result, which is obviously faulty because the value should be different for d and c variables.


So, the question was whether this is a bug or by design (by design I mean: do this operation on your own risk)?
The answer is quite logical and simple: it is a bug and R! guys are woking on to fix it.


 

Leave a Reply