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

Await + LINQ query syntax breaks formatting #740

Closed
domn1995 opened this issue Oct 14, 2022 · 1 comment · Fixed by #741
Closed

Await + LINQ query syntax breaks formatting #740

domn1995 opened this issue Oct 14, 2022 · 1 comment · Fixed by #741
Milestone

Comments

@domn1995
Copy link
Sponsor Contributor

domn1995 commented Oct 14, 2022

Given the following code:

var result = await from a in b
    from c in d
    from e in SomethingAsync(a, c)
    select e;

It gets formatted into:

var result = await from a in b
from c in d
from e in SomethingAsync(a, c)
select e;

instead of

var result = await 
    from a in b
    from c in d
    from e in SomethingAsync(a, c)
    select e;
@belav belav added this to the 1.0.0 milestone Oct 14, 2022
@domn1995
Copy link
Sponsor Contributor Author

Here's a sharplab gist so we can look at the AST: https://sharplab.io/#gist:9b96f1b9df2c77bd9da37bd4fd4aed08

Looks like it's just an AwaitExpression followed by a QueryExpression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants