Extract Method bug
I stumbled across a problem this morning and have tried to distill it down to the basic situation.
I was doing an Extract Method of some code inside a foreach loop. The extracted code has a return statement in the middle.
Before Refactoring:
After Refactoring:
The refactored code doesn't preserve behavior which is a BadThing™. I seem to remember Eclipse issuing a warning about this situation in Java code (multiple return paths?) but am not at a machine where I can verify that.
-paul
Please sign in to leave a comment.
Oops - this appears to duplicate #5003. Sorry!
Oops^2 - I meant 5301.
http://www.intellij.net/tracker/resharper/viewSCR?publicId=5301