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

SA1119 Incorrectly suggests removing brackets #2597

Closed
hisuwh opened this issue Jan 17, 2018 · 1 comment
Closed

SA1119 Incorrectly suggests removing brackets #2597

hisuwh opened this issue Jan 17, 2018 · 1 comment

Comments

@hisuwh
Copy link

hisuwh commented Jan 17, 2018

Stylecop analyzer rule is telling me to remove the extra parentheses in this line:

if (!(obj is TestValue testValue))

But the result does not compile as you can not use the ! operator with type object:
if (!obj is TestValue testValue)

@sharwell
Copy link
Member

Duplicate of #2372

@sharwell sharwell marked this as a duplicate of #2372 Jan 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants