dotnet/roslyn
View on GitHubUnexpected formatting when attribute is on same line as property with default value
Open
#50,017 opened on Dec 16, 2020
Area-IDEBugIDE-Formatterhelp wanted
Repository metrics
- Stars
- (20,414 stars)
- PR merge metrics
- (Avg merge 6d 17h) (256 merged PRs in 30d)
Description
The code
namespace Foo
{
public class Bar
{
[Parameter] public DelegateType Value { get; set; } = (value, second) => (builder) =>
{
builder.Baz();
};
}
}
reformats to
namespace Foo
{
public class Bar
{
[Parameter]
public DelegateType Value { get; set; } = (value, second) => (builder) =>
{
builder.Baz();
};
}
}
I would expect
namespace Foo
{
public class Bar
{
[Parameter]
public DelegateType Value { get; set; } = (value, second) => (builder) =>
{
builder.Baz();
};
}
}
or actually to do nothing at all.
dotnet format version is 4.1.131201