Skip to content

Incorrect "Remove unused parameter" for record #47142

@pawchen

Description

@pawchen

Version Used:
VS16.8 preview 2

Steps to Reproduce:

    record A(int X);

    record B(int X, int Y /* Unexpected IDE0060 */) : A(X);

    class C
    {
        void Func(B b)
        {
            Use(b.Y);
        }

        private void Use(int i)
        {
        }
    }

Expected Behavior:
Should not suggest removing int Y near the comment

Actual Behavior:

Metadata

Metadata

Assignees

Labels

Area-IDEBugFeature - RecordsRecordsIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringsUrgency-Soonhelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions