Author |
Topic |
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Dec 09 2020 : 07:38:36 AM
|
C#: When I change the name of a struct, and then use the VA "Rename references" menu that (sometimes) appears, there is a underlying fatal bug: when the new name contains the name of another type, the rename may change all references of the contained name instead of the changed one. Example: two types "struct Niceone" and "class Naughty", now I type Naughty in front of the Niceone, the rename references will change all Naughty references into "NaughtyNiceone" instead of the Niceone references.
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Dec 11 2020 : 1:17:16 PM
|
Ignoring the "why won't this in place refactoring trigger" problem, how often do you run into this?
I have managed to reproduce it once, but so far only once. Definitely a nasty problem, and I don't like the idea of it happening on rename without a preview. Still, I just wish I could reproduce this more reliably. I have put in a bug report for my test case:
case=144196 |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Dec 11 2020 : 1:58:44 PM
|
seems to be constant. Whenever you have added a name in front that exists as a type, it will change the wrong one. |
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Dec 14 2020 : 11:18:37 AM
|
I have tried several different things here, but I still cannot get this to happen. I have seen this bug once, but none of my follow up tests have reproduced it.
I have added a note to the case to explain how often you are seeing this.
I hope that triggering Rename via the rename dialog is at least reliable and safe. |
zen is the art of being at one with the two'ness |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Dec 14 2020 : 11:58:52 AM
|
Not really using the rename dialog, but by quick testing it seems to work. |
|
|
Uniwares
Tomato Guru
Portugal
2322 Posts |
Posted - Dec 16 2020 : 09:16:57 AM
|
Just had another instance of the same problem:
namespace XX.yyy
Have a namespace called XX somewhere and now remove the dot, hit enter on VA�s "Rename references" or "Rename references with preview..." All instances of XX will be renamed to XXyyy
Its actually a even trickier situation, since we are messing with two namespaces, XX and yyy. |
|
|
|
Topic |
|