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

RSRP-468105: 'Make all fields readonly in scope' QF doesn't work with public fields

$
0
0
Reporter Andrey Dyatlov (Andrey.Dyatlov) Andrey Dyatlov (Andrey.Dyatlov)
Created Jan 26, 2018 6:22:23 PM
Updated Apr 11, 2018 5:27:34 PM
Resolved Apr 11, 2018 5:27:34 PM
Subsystem Quick Fixes
Assignee Alexander Shvedov (shvedov)
Priority Normal
State Duplicate
Type Bug
Fix version No Fix versions
Affected versions 2017.3.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
Apply bulk QF 'make all fields readonly in file' to any field in the following code snippet:

class C
{
public static int x = 0;
public static int y = 0;
private static int z = 0;

public static int Z => z;
}

class D
{
public static int Sum => C.x + C.y;
}

note that only field 'z' is actually affected by the fix even if you use it from 'x' or 'y'

This behavior is especially frustrating if you don't have private fields which could be readonly so it appears that the fix just does nothing.

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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