Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IDE0004 false positive when using GetType() #75424

Open
nalka0 opened this issue Oct 7, 2024 · 0 comments
Open

IDE0004 false positive when using GetType() #75424

nalka0 opened this issue Oct 7, 2024 · 0 comments
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead

Comments

@nalka0
Copy link

nalka0 commented Oct 7, 2024

Version Used:

Visual Studio Community 2022 version 17.11.4

Steps to Reproduce:

var x = ((byte)3).GetType();

In the above snippet x represents typeof(byte) with the cast and would represent typeof(int) without it

Diagnostic Id:

"IDE0004: Cast is redundant"

Expected Behavior:

No IDE0004 on the above snippet

Actual Behavior:

IDE0004 happens on the above snippet

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

No branches or pull requests

1 participant