codeformatter
codeformatter copied to clipboard
MarkReadonlyFieldRule only marks one field of the same name per run.
class Outer1
{
class Inner
{
private object _couldBeReadonly;
}
}
class Outer2
{
class Inner
{
private object _couldBeReadonly;
}
}
This will only mark Outer1+Inner._couldBeReadonly as readonly.
In the real-world example where this was hit, the inner class name and field name were identical, so the "class-scoped" name for both of them would be the same.