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
Convert to switch expression produces wrong code #48829
Comments
This was claimed to be fixed by #46873 per #48006 (comment) |
@sharwell I was using Version 16.9.0 Preview 2.0 [30620.297.main] when I took this screenshot. |
@ryzngard what version of the code style analyzers are installed in the project? |
3.8.0-2.20414.4 |
@jinujoseph I think we need to up the priority of this. I'm seeing in 16.8p6. |
It's a bug. I don't see the priority needing changing here for a refactoring doing the wrong thing. |
IMO, this is the type of bug I would take for a servicing bar check. It's the type of thing that reduces faith in our refactorings, meaning people are less likely to use them, and it's likely a common refactoring that people would want to use, particularly as they start exploring C# 9 and or patterns. |
We would not. We've shipped far worse bugs in refactorings all the time.
Faith in refactoring does not meet the servicing bar. The servicing bar is extremely critical issue blocking work. This is an optional feature that doesn't do the right thing here. It's not the first, nor last time we've had that. And it definitely does not meet any divisional servicing bars. |
Very weird. I can repro this in hte prodct, but ont in a small repro. Not certain what's going on here. |
Opening up roslyn in roslyn to see what's up here... |
Conversion is dropping all but the first case statement.
The text was updated successfully, but these errors were encountered: