Skip to content

Commit

Permalink
fixing issue with extra line before collection expression within a ca… (
Browse files Browse the repository at this point in the history
#1335)

…st expression

closes #1334
  • Loading branch information
belav committed Aug 28, 2024
1 parent 4d51407 commit 8bca3ce
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,3 +146,35 @@ class MyClass
]
)]
class ClassName { }

class CastExpressions
{
void MethodName()
{
var x = (string[])[someValue, someValue];

var x = (string[])
[longValue________________________________, longValue________________________________];

var x = (string[])
[
longerValue_____________________________________________,
longerValue_____________________________________________,
];

CallMethod((string[])[someValue, someValue]);

CallMethod(
(string[])
[longValue______________________________, longValue______________________________]
);

CallMethod(
(string[])
[
longerValue_____________________________________________,
longerValue_____________________________________________,
]
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ public static Doc Print(CollectionExpressionSyntax node, FormattingContext conte
is ArgumentSyntax { NameColon: null }
or AttributeArgumentSyntax
or ArrowExpressionClauseSyntax
or CastExpressionSyntax
or ExpressionElementSyntax
or SimpleLambdaExpressionSyntax
or AssignmentExpressionSyntax
Expand Down

0 comments on commit 8bca3ce

Please sign in to comment.