Skip to content

BUG: CC0057 Parameter not used false positive in Constructor Expression Body #912

@MJRamello

Description

@MJRamello

Sample class and constructor

public class Foo
{
     private string _bar;

     public Foo(string bar) => this._bar = bar;
}

When assigning a parameter to a private field in an expression bodied constructor warning CC0057 (Parameter not used) is triggered although the parameter is used.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions