Error when applying the IDE0059 rule on code with simplified 'new' expression #64291
Labels
Area-IDE
Bug
Tenet-Reliability
Customer telemetry indicates that the product is failing in a crash/hang/dataloss manner.
Milestone
This issue has been moved from a ticket on Developer Community.
[severity:It bothers me. A fix would be nice]
When I apply the rule IDE0059 to remove a unnecessary value assignment that can be discarded with _ but the variable has a simplified 'new' expression the discarded version does not know the Type.
So in this example the version after applying the rule does not know what Type the simplified new should be.
The solution to this would be that when applying the IDE0059 rule it should be checked if there is a simplified new and than add the ClassType to that like this:
Original Comments
Feedback Bot on 9/22/2022, 05:28 PM:
(private comment, text removed)
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: