[235] Rename bug for class fields

I have this code:

...
private bool useTransaction;

public bool UseTransaction
{
get { return useTransaction; }
set { useTransaction = value; }
}
...

When I try to rename "useTransaction" field to "_useTransaction", I get this as an end result:

...
private bool _useTransaction;

public bool _useTransaction
{
get { return _useTransaction; }
set { _useTransaction = value; }
}
...

I get some non-sense errors in the Rename dialog box for resolving the problems which when I click on Refresh, they go away.

Ali Bolourian
http://www.bolourian.com

null

0
5 comments

Have you configured "_" as your field prefix in your Resharper Options?

"Ali Bolourian" <no_reply@jetbrains.com> wrote in message
news:3872146.1145390455892.JavaMail.itn@is.intellij.net...
>I have this code:
>

..
private bool useTransaction;

>

public bool UseTransaction
{
get { return useTransaction; }
set { useTransaction = value; }
}
..

>

When I try to rename "useTransaction" field to "_useTransaction", I get
this as an end result:

>

..
private bool _useTransaction;

>

public bool _useTransaction
{
get { return _useTransaction; }
set { _useTransaction = value; }
}
..

>

I get some non-sense errors in the Rename dialog box for resolving the
problems which when I click on Refresh, they go away.

>

Ali Bolourian
http://www.bolourian.com



0

Not when I was doing this test. I later did. Does it have anything to do with this bug?

0

If Resharper knows about your prefixes, it will strip them off before naming
Properties based on fields with prefixes.

"Ali Bolourian" <no_reply@jetbrains.com> wrote in message
news:13482373.1145396591822.JavaMail.itn@is.intellij.net...

Not when I was doing this test. I later did. Does it have anything to do
with this bug?



0

I think you didn't get my point. My point and the bug is that why should R# rename the public property (UseTransaction) along with the field which I asked to be renamed (useTransaction). I'm assuming that R# taks case sensitivity in consideration which in this case it doesn't.

Ali

0

Still, it's a bug

If Resharper knows about your prefixes, it will strip them off before
naming Properties based on fields with prefixes.



0

Please sign in to leave a comment.