Skip to content

Declaration name completion recommends an unnecessary difference for nested type primary constructor parameters #79417

@RikkiGibson

Description

@RikkiGibson
class MyWidget { }
class C(MyWidget myWidget)
{
    class D(MyWidget my$) { }
}

Expected: name myWidget is recommended.
Actual: name myWidget1 is recommended.
(I'm not fully certain if the behavior I am seeing for class primary constructor parameters is intentional here though.)

Compare with the local functions behavior where myWidget recommended in the nested/shadowing case:

class MyWidget { }
class C
{
    void M(MyWidget myWidget)
    {
        void local(MyWidget my$) { }
    }
}

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

    Projects

    Status

    Completed

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions