codeformatter icon indicating copy to clipboard operation
codeformatter copied to clipboard

MarkReadonlyFieldRule only marks one field of the same name per run.

Open bartonjs opened this issue 10 years ago • 0 comments

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.

bartonjs avatar May 13 '15 19:05 bartonjs