Version Used: Visual Studio 2022 Preview 4, Compiler version: '4.0.0-4.21458.2 (2bfff7b)'. Language version: 10.0.
Steps to Reproduce:
- In a new .NET 6 console project, populate
Program.cs with the following:
var a = [A] short () => 100;
var b = [A] () => 100;
var c = short () => 100;
public sealed class AAttribute : Attribute { }
- Format the document using Edit -> Advanced -> Format Document or run Code Cleanup
Expected Behavior:
No changes, the code is well-formatted.
Actual Behavior:
The space between the assignment operator and the attribute is removed:
var a =[A] short () => 100;
var b =[A] () => 100;
var c = short () => 100;
public sealed class AAttribute : Attribute { }
As far as I know there is not an editorconfig setting for the spaces around the assignment operator, but to remove any doubt I also reproduced this with with Roslyn's .editorconfig.
Relates to test plan #52192
Version Used: Visual Studio 2022 Preview 4, Compiler version: '4.0.0-4.21458.2 (2bfff7b)'. Language version: 10.0.
Steps to Reproduce:
Program.cswith the following:Expected Behavior:
No changes, the code is well-formatted.
Actual Behavior:
The space between the assignment operator and the attribute is removed:
As far as I know there is not an editorconfig setting for the spaces around the assignment operator, but to remove any doubt I also reproduced this with with Roslyn's
.editorconfig.Relates to test plan #52192