Reporter | T (thymin) |
---|---|
Created | Mar 9, 2013 9:14:16 PM |
Updated | Apr 26, 2018 2:25:35 PM |
Subsystem | Refactorings |
Assignee | Alisa Afonina (alisa.afonina) |
Priority | Normal |
State | Submitted |
Type | Bug |
Fix version | Backlog |
Affected versions | 2018.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Code:
class MyClass
{
int field;
public MyClass()
{
}
}
Now add a new ctor parameter using ctrl-r,s "int field" so that the name collides with the field. What result would you expect? I expected (and hereby request):
public MyClass(int field)
{
}
But R# produces:
public MyClass(int field1) //wrong name
{
}
Wrong name! The ctor argument name did not collide with the field. This is not a compiler error.
This bug exists in a ton of different places. Basically everywhere where R# decides to "helpfully" auto-correct a name that was directly entered by the developer.
My previous bug RSRP-339017 is related to this. Just never change what the developer entered and all these bugs go away! (Alternatively, just fix both bugs).
Thanks.
class MyClass
{
int field;
public MyClass()
{
}
}
Now add a new ctor parameter using ctrl-r,s "int field" so that the name collides with the field. What result would you expect? I expected (and hereby request):
public MyClass(int field)
{
}
But R# produces:
public MyClass(int field1) //wrong name
{
}
Wrong name! The ctor argument name did not collide with the field. This is not a compiler error.
This bug exists in a ton of different places. Basically everywhere where R# decides to "helpfully" auto-correct a name that was directly entered by the developer.
My previous bug RSRP-339017 is related to this. Just never change what the developer entered and all these bugs go away! (Alternatively, just fix both bugs).
Thanks.