dotnet/roslyn
View on GitHubDelegates are not properly reformatted when converting property from expression body to block body
Open
#71,637 opened on Jan 14, 2024
Area-IDEBughelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
Version Used: VS 17.8.4
Steps to Reproduce:
For both properties, open the lightbulb menu and select "Use block body for property".
class C
{
Action A => delegate
{
};
Action A2 => () =>
{
};
}
Expected Behavior:
The block of the delegate or lambda is correctly indented.
Actual Behavior: The indentation of the delegate body is not changed.
Interestingly, type creation expression within the property body are correctly formatted/indented: