"Remove redundant assignment" removes unrelated code #72829
Labels
Area-IDE
Bug
Feature - IDE0059
Unused value
help wanted
The issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
If I use the Quick Action IDE0059 "Remove redundant assignement" with a particular setup, it will erroneously remove unrelated code and break logic. This is the problematic code setup:
If I use IDE0059 on the variable
items
, it will correctly remove= default
, but it will also erroneously removeusing var _ =
a few lines below, which breaks the code logic.using var _
is not a redundant assignment and it is needed to dispose of theListPool<DisplayedItemData>.Get(..)
return value.This is a dangerous bug because it alters the logic of the code without telling you.
Original Comments
Feedback Bot on 3/28/2024, 10:19 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: