Reporter | 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:
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.
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.