Skip to content

IDE0017 is not proposed in top-level code #61066

@DoctorKrolic

Description

@DoctorKrolic

Version Used:
Latest main (55bc2b7)

Steps to Reproduce:

MyClass cl = new(); // 1
cl.MyProperty = 5;

void M()
{
    MyClass cl = new(); // 2
    cl.MyProperty = 5;
}

class MyClass
{
    public int MyProperty { get; set; }
}

Expected Behavior:
IDE0017 is reported both in case // 1 and case // 2

Actual Behavior:
IDE0017 is reported only for case // 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions