Skip to content

Open question for shadowing field keyword in semi auto property #5703

@Youssef1313

Description

@Youssef1313

I do think we should ask the LDM what this code means though:

int Prop
{
    set
    {
        field = value;
        {
            int field = 0; // Does this shadow the backing field? Or is there an error reported somewhere?
        }
    }
}

Originally posted by @333fred in dotnet/roslyn#59109 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions