-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fixup improper parenthesized expression in 'use pattern combinators'. #73391
Conversation
@@ -103,7 +103,7 @@ public async Task TestMissingOnExpression(string expression) | |||
await TestAllMissingOnExpressionAsync(expression); | |||
} | |||
|
|||
[InlineData("i == default || i > default(int)", "i is default(int) or > (default(int))")] | |||
[InlineData("i == default || i > default(int)", "i is default(int) or > default(int)")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was the bug that was being fixed.
@@ -166,9 +166,6 @@ private static bool AddSimpleName(SimpleNameSyntax simpleName, List<string> part | |||
return true; | |||
} | |||
|
|||
public static bool IsAnyLiteralExpression(this ExpressionSyntax expression) | |||
=> expression is LiteralExpressionSyntax; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pointless helper. removed as i would prefer people make the direct and clear type checks.
// (checked(1)) -> checked(1) | ||
// (unchecked(1)) -> unchecked(1) | ||
// (sizeof(int)) -> sizeof(int) | ||
if (expression is TypeOfExpressionSyntax or DefaultExpressionSyntax or CheckedExpressionSyntax or SizeOfExpressionSyntax) | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was the fix.
Extracted from #73357.