Skip to content

IDE Usage Analysis Does Not Account for Lambda Default Parameters #63892

@adamperlin

Description

@adamperlin
class C
{
    const int N = 10;
    void M()
    {
        var lam = (int x = N) => x;
    }
}

In the following case, N is shown as unused in the IDE, when its usage as a default parameter value for the lambda should be tracked. We are already removing unused variable warnings when they occur for local constants used as default parameter values for lambdas and local functions in the compiler: #63850

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    Status

    InQueue

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions