diff --git a/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/StructDeclarations.test b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/StructDeclarations.test index afc2499d6..7a2d25180 100644 --- a/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/StructDeclarations.test +++ b/Src/CSharpier.Tests/FormattingTests/TestFiles/cs/StructDeclarations.test @@ -1,3 +1,12 @@ struct BasicStruct { } public readonly struct ReadonlyStruct { } + +public struct NamedItem2( + string name1________________________________, + string name2________________________________ +) +{ + public string Name1 => name1; + public string Name2 => name1; +} diff --git a/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/BaseTypeDeclaration.cs b/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/BaseTypeDeclaration.cs index 95285d43d..74692d014 100644 --- a/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/BaseTypeDeclaration.cs +++ b/Src/CSharpier/SyntaxPrinter/SyntaxNodePrinters/BaseTypeDeclaration.cs @@ -35,6 +35,7 @@ public static Doc Print(BaseTypeDeclarationSyntax node, FormattingContext contex else if (node is StructDeclarationSyntax structDeclarationSyntax) { keyword = structDeclarationSyntax.Keyword; + parameterList = structDeclarationSyntax.ParameterList; } else if (node is InterfaceDeclarationSyntax interfaceDeclarationSyntax) {