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

RSRP-469133: Code Cleanup: "Use auto-property if possible" with "Accessors with block body" in Code Style results in uncompilable code.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 6, 2018 3:36:32 PM
Updated Apr 13, 2018 7:44:02 PM
Subsystem Code Style - Cleanup
Assignee Andrew Karpov (andrew.karpov)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains ReSharper Ultimate 2018.1 EAP 7 D 12.0.20180406.060450-eap07.

        private bool _isLoading2;

        public bool IsLoading
        {
            get => _isLoading2;
            set { _isLoading2 = value; }
        }
  1. In ReSharper -> Options -> Code Editing -> C# -> Code Style set "Accessors with block body" for Code Body -> Properties, indexers and events.
  2. In ReSharper -> Options -> Code Cleanup -> C# check "Apply code body style" and check "Use auto-property if possible".

Actual result:
Uncompilable code.

ublic bool IsLoading
        {
            get
            {
            }
            set;
        }

Expected result:
Compilable code.

        public bool IsLoading
        {
            get;
            set;
        }

Viewing all articles
Browse latest Browse all 106942

Trending Articles