-
Notifications
You must be signed in to change notification settings - Fork 4.2k
false positive redundant cast #32773
Copy link
Copy link
Closed
Labels
Area-IDEBugIDE-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-IDEBugIDE-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.
Assuming that bounds is long, start and end is int. following gives a warning
In my case it doesn't really matter to use sign or zero extension. start is always positive. for sake of hiding the warning
says cast is redundant. I think if compiler suggests to resolve ambiguity, then it shouldn't suggest to introduce ambiguity again. (in my case it doesn't matter but i thought its good to share)