ReSharper does not find usages of type in lambda parameters

Hi,

I am using ReSharper 2023.1 with VisualStudio 2019. I think it would be useful if ReSharper also finds usages of types in lambdas with implicit parameter types - what do you think about it? Can you put this feature into your roadmap, please? I think it can help developers not to overlook important information during code analysis.
If lambda parameters are explicitly typed then ReSharper will find them.

Here is an example:

public interface IMyInterface {  }
public class MainClass
{
    private void Process(Action<IMyInterface> act) {  }
    public void MainMethod()
    {
        Process((x) => {  }); // It won't show up in any group of "Find Results" when "Find Usages" of IMyInterface
        Process((IMyInterface x) => {  }); // It will show up in group "Parameter declaration (non-extension)" of "Find Results" when "Find Usages" of IMyInterface
    }
}

Otherwise I must admit ReSharper is very useful tool.

Best regards,

Marek

0
1 comment
Hello Marek,

I've filed a corresponding feature request here - https://youtrack.jetbrains.com/issue/RSRP-492490/Find-usages-of-type-in-lambda-implicit-parameter-types. Please feel free to comment or vote for it.
Thank you.
0

Please sign in to leave a comment.