-
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
Improve Normalize Whitespace for block lambdas #46661
Improve Normalize Whitespace for block lambdas #46661
Conversation
@@ -282,7 +282,8 @@ private static int LineBreaksAfterOpenBrace(SyntaxToken currentToken, SyntaxToke | |||
private static int LineBreaksAfterCloseBrace(SyntaxToken currentToken, SyntaxToken nextToken) | |||
{ | |||
if (currentToken.Parent is InitializerExpressionSyntax || | |||
currentToken.Parent.IsKind(SyntaxKind.Interpolation)) | |||
currentToken.Parent.IsKind(SyntaxKind.Interpolation) || | |||
currentToken.Parent?.Parent is ParenthesizedLambdaExpressionSyntax or SimpleLambdaExpressionSyntax) |
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.
What about anonymous methods?
Also, can just do is LambdaExpression
}; | ||
} | ||
});"); | ||
} |
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.
Would prefer a theory here. That way if one fails it's trivial to just run that config
@dotnet/roslyn-compiler for a second review. |
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.
LGTM Thanks (iteration 3)
Merged/squashed. Thanks @YairHalberstadt! |
Fixes #46656