mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #326 - Spaces missing after attributes in function literals merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
This commit is contained in:
parent
16c3811261
commit
f3463cdd34
4 changed files with 9 additions and 1 deletions
|
@ -786,7 +786,7 @@ private:
|
|||
else if (astInformation.funLitStartLocations.canFindIndex(tIndex))
|
||||
{
|
||||
sBraceDepth++;
|
||||
if (peekBackIs(tok!")"))
|
||||
if (peekBackIsOneOf(true, tok!")", tok!"identifier"))
|
||||
write(" ");
|
||||
auto e = expressionEndIndex(index);
|
||||
immutable int l = currentLineLength + tokens[index .. e].map!(a => tokenLength(a))
|
||||
|
|
4
tests/allman/issue0326.d.ref
Normal file
4
tests/allman/issue0326.d.ref
Normal file
|
@ -0,0 +1,4 @@
|
|||
void main()
|
||||
{
|
||||
() @trusted { stderr.writeln("\033[01;33m", url, "\033[0m"); }();
|
||||
}
|
1
tests/issue0326.d
Normal file
1
tests/issue0326.d
Normal file
|
@ -0,0 +1 @@
|
|||
void main(){()@trusted{stderr.writeln("\033[01;33m", url, "\033[0m");}();}
|
3
tests/otbs/issue0326.d.ref
Normal file
3
tests/otbs/issue0326.d.ref
Normal file
|
@ -0,0 +1,3 @@
|
|||
void main() {
|
||||
() @trusted { stderr.writeln("\033[01;33m", url, "\033[0m"); }();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue