Skip to content

Redundant cast is not redundant! #54388

@vsfeedback

Description

@vsfeedback

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IDEBugDeveloper CommunityThe issue was originally reported on https://developercommunity.visualstudio.comIDE-CodeStyleBuilt-in analyzers, fixes, and refactoringshelp wantedThe issue is "up for grabs" - add a comment if you are interested in working on it

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions