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

Formatting AST including @trusted delegate produces invalid output #383

Closed
Geod24 opened this issue Feb 19, 2020 · 4 comments · Fixed by #399
Closed

Formatting AST including @trusted delegate produces invalid output #383

Geod24 opened this issue Feb 19, 2020 · 4 comments · Fixed by #399
Labels

Comments

@Geod24
Copy link
Member

Geod24 commented Feb 19, 2020

TL;DR: Test case for formatter.d:

testFormatNode!(AssertExpression)("static assert(() @trusted { return bar()(3); }() == 4);");

Was trying to update libdparse for dlang.org (dlang/dlang.org#2758) and hit this bug.
The code:

 assert(() @trusted { return bar()(3); }() == 4);

from here is turned into:

assert (() @trusteddo
{ return bar()(3);
}() == 4)

by formatter, which is obviously invalid.

@WebFreak001
Copy link
Member

related to #346

@Geod24
Copy link
Member Author

Geod24 commented May 16, 2020

Fixed by #399

@WebFreak001
Copy link
Member

@Geod24 fyi you can link pull requests in issues (and link issues in pull requests) to automatically close them with a reference:
popup showing when clicking on linked pull requests

@Geod24
Copy link
Member Author

Geod24 commented May 18, 2020

I don't have that kind of power in dlang-community ;)

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

Successfully merging a pull request may close this issue.

2 participants