Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE0039 is not reported for implicitly typed lambda #68439

Closed
cremor opened this issue Jun 5, 2023 · 0 comments · Fixed by #68448
Closed

IDE0039 is not reported for implicitly typed lambda #68439

cremor opened this issue Jun 5, 2023 · 0 comments · Fixed by #68448
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@cremor
Copy link

cremor commented Jun 5, 2023

Version Used:
VS 17.6.2

Steps to Reproduce:

  1. Create a new .NET 7 app.
  2. Add a .editorconfig file and set csharp_style_prefer_local_over_anonymous_function = true:warning.
  3. Add the code Func<int, int> test = (int n) => n * 2;.
  4. See that IDE0039 is reported.
  5. Change the code to var test = (int n) => n * 2;

Diagnostic Id:
IDE0039

Expected Behavior:
IDE0039 should be reported for implicitly typed lambdas (or implicitly typed anonymous functions with a block body).

Actual Behavior:
IDE0039 is not reported for implicitly typed lambdas (or implicitly typed anonymous functions with a block body).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant