-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Redundant cast is not redundant! #54388
Copy link
Copy link
Closed
Labels
Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comThe issue was originally reported on https://developercommunity.visualstudio.comIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringsBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on itThe issue is "up for grabs" - add a comment if you are interested in working on it
Milestone
Metadata
Metadata
Assignees
Labels
Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comThe issue was originally reported on https://developercommunity.visualstudio.comIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringsBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on itThe issue is "up for grabs" - add a comment if you are interested in working on it
Type
Fields
Give feedbackNo fields configured for issues without a type.
This issue has been moved from a ticket on Developer Community.
Following code got refactored by removing redundant casts in the solution:
... = new((decimal)-1)
This class has 2 constructors. One for decimal and one for double. Without the explicit cast to one of both the compiler don't know which constructor to choose.
Original Comments
Feedback Bot on 6/24/2021, 00:09 AM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)