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

StatementMustNotUseUnnecessaryParenthesis forces removing needed paranthesis #2828

Closed
idigra opened this issue Nov 22, 2018 · 1 comment
Closed

Comments

@idigra
Copy link

idigra commented Nov 22, 2018

The mentioned rules claims that the following line is illegal:
if (maybe.HasNoValue || !(maybe.Value is TTo value))
(maybe is a struct of type Maybe from CSharpFunctionalExtensions nuget).

However it is not syntactically equivalent to remove this parenthesis. Without them, the compiler complains that operator "!" cannot be applied on maybe.Value.

@sharwell
Copy link
Member

Duplicate of #2372

@sharwell sharwell marked this as a duplicate of #2372 Nov 24, 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