Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudomitori committed Jun 12, 2024
1 parent 7bc84c8 commit 4a2b64f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,13 @@ class ClassName
.CallMethod()
.CallMethod()
};

// Issue#1268
var someObject = new List<(
int Field1__________________________________,
int Field2__________________________________
)>
{ };
}

private SomeObject someObject =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,23 @@ is SyntaxKind.ArrayInitializerExpression
var result = Doc.Concat(
separator,
Token.Print(node.OpenBraceToken, context),
Doc.Indent(
alwaysBreak ? Doc.HardLine : Doc.Line,
SeparatedSyntaxList.Print(
node.Expressions,
Node.Print,
alwaysBreak ? Doc.HardLine : Doc.Line,
context
)
),
node.Expressions.Any()
? alwaysBreak
? Doc.HardLine
: Doc.Line
: Doc.Null,
node.Expressions.Count == 0
? " "
: Doc.Concat(
Doc.Indent(
alwaysBreak ? Doc.HardLine : Doc.Line,
SeparatedSyntaxList.Print(
node.Expressions,
Node.Print,
alwaysBreak ? Doc.HardLine : Doc.Line,
context
)
),
alwaysBreak ? Doc.HardLine : Doc.Line
),
Token.Print(node.CloseBraceToken, context)
);

return
node.Parent
is not (
Expand Down

0 comments on commit 4a2b64f

Please sign in to comment.