Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-113483: "Create Property" CA creates invalid property

$
0
0
Reporter Drew Noakes (drewnoakes) Drew Noakes (drewnoakes)
Created Jul 6, 2009 5:32:24 PM
Updated Apr 6, 2018 3:38:33 PM
Resolved Apr 6, 2018 3:38:33 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
R# highlighted the unknown symbol IsLoading in a usage such as this:

IsLoading = true;

The CA create property creates this in a sealed class:

        protected bool IsLoading
{

}

Of course it is a little strange to produce a protected member in a sealed class, as R# correctly points out after creating it.

Furthermore, choosing 'Create _isLoading as a backing field' creates this:

        protected bool IsLoading
{
get {
return _isLoading;
}
set {
_isLoading = value;
}
}

...even though my coding style preferences would create this (and does, if I reformat)...

        protected bool IsLoading
{
get { return _isLoading; }
set { _isLoading = value; }
}

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>