Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IsPattern with Conditional breaking #196

Closed
belav opened this issue May 15, 2021 · 3 comments
Closed

IsPattern with Conditional breaking #196

belav opened this issue May 15, 2021 · 3 comments
Labels

Comments

@belav
Copy link
Owner

belav commented May 15, 2021

var result = Doc.Concat(
    node.Kind()
        is (SyntaxKind.ArrayInitializerExpression
            or SyntaxKind.ComplexElementInitializerExpression) ? Doc.Null : Doc.Line
);
// should be something like
var result = Doc.Concat(
    node.Kind()
        is (SyntaxKind.ArrayInitializerExpression or SyntaxKind.ComplexElementInitializerExpression) 
      ? Doc.Null
      : Doc.Line
);
@belav belav added type:bug Something isn't working area:formatting labels May 15, 2021
@belav
Copy link
Owner Author

belav commented Jun 14, 2021

Related

            return Doc.Concat(
                Token.Print(node.ElseKeyword),
                node.Statement
                    is IfStatementSyntax ifStatementSyntax
                    ? Doc.Concat(" ", IfStatement.Print(ifStatementSyntax))
                    : OptionalBraces.Print(node.Statement)
            );
// should be
            return Doc.Concat(
                Token.Print(node.ElseKeyword),
                node.Statement is IfStatementSyntax ifStatementSyntax
                    ? Doc.Concat(" ", IfStatement.Print(ifStatementSyntax))
                    : OptionalBraces.Print(node.Statement)
            );

@belav
Copy link
Owner Author

belav commented Jul 19, 2021

This should be looked at after #154 and #7

@belav
Copy link
Owner Author

belav commented Oct 19, 2021

This was resolved at some point

@belav belav closed this as completed Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant