Skip to content
This repository has been archived by the owner. It is now read-only.

RECS0154 Parameter is never used false positive in Constructor Expression Body #320

Open
Thieum opened this issue Jun 30, 2017 · 1 comment

Comments

@Thieum
Copy link

Thieum commented Jun 30, 2017

Consider the following code:

public UserDetailController(IUserDetailService service) => _Service = service;

service will be considered as not used and raise a RECS0154, despite the fact that it is used.

Using Refactoring Essentials 5.2.0.0 in VS2017 15.2.26430.14, in a .NET framework 4.7 project.

@Thieum
Copy link
Author

Thieum commented Jul 5, 2017

Same goes for RECS0004, considering the following code:

public class AmountTypeEntity : Entity
    {
        public AmountTypeEntity() => Initialize("Test");
    }

aluanhaddad added a commit to aluanhaddad/RefactoringEssentials that referenced this issue Nov 26, 2017
The unused parameter analyzer now recognizes expression bodied
constructors.

Resolves icsharpcode#320
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant