Skip to content

Fix all for simplify name distinguishes between constructors and static member accesses #22713

@rchande

Description

@rchande

Fix all on the "simplify name" lightbulb that appears on each instance of ConsoleApp47 only fixes that instance. It looks like that's because we treat static member access as distinct from constructor invocation. Not sure what the right behavior is, but this was initially confusing to me.

namespace ConsoleApp47
{
    class Program
    {
        static int x;

        void foo()
        {
            var z = new ConsoleApp47.Program();
            ConsoleApp47.Program.x = 1;
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions