You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i.e. it leaves a blank line between the property declaration and the value. This isn't consistent with the behaviour for fields or auto-properties (=>) which don't add a blank line so I assume it's unintentional.
The text was updated successfully, but these errors were encountered:
I'd be happy to contribute a fix by the way. From a very brief look it looks like this could be fixed by modifying the declaration of separator in CollectionExpression.cs such that it includes EqualsValueClauseSyntax with a parent of PropertyDeclarationSyntax, so:
or EqualsValueClauseSyntax
{
- Parent: not (PropertyDeclarationSyntax or VariableDeclaratorSyntax)+ Parent: not VariableDeclaratorSyntax
}
? Doc.Null
but since this seems to have been explicitly excluded, I'd like to understand why that is before I work on a pull request that would end up breaking stuff 😅
I don't remember exactly what that does, but the tests should hopefully catch anything that you break. I was thinking it had to do with the ExpressionBody property in there, but I don't believe that contains an EqualsValueClause.
I see some of the formatting issues with C# 12 collection expressions were fixed in #1047 but I think I have found another one.
I'm using version 0.26.4 and have found that the following code:
will get formatted to
i.e. it leaves a blank line between the property declaration and the value. This isn't consistent with the behaviour for fields or auto-properties (
=>
) which don't add a blank line so I assume it's unintentional.The text was updated successfully, but these errors were encountered: