mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #45
This commit is contained in:
parent
b989388e7c
commit
0a71960d98
3 changed files with 19 additions and 2 deletions
|
@ -740,8 +740,10 @@ private:
|
|||
{
|
||||
if (current.type == tok!";")
|
||||
{
|
||||
write("; ");
|
||||
currentLineLength += 2;
|
||||
if (!(peekIs(tok!";") || peekIs(tok!")")))
|
||||
write("; ");
|
||||
else
|
||||
write(";");
|
||||
index++;
|
||||
continue;
|
||||
}
|
||||
|
|
6
tests/issue0045.d
Normal file
6
tests/issue0045.d
Normal file
|
@ -0,0 +1,6 @@
|
|||
void doStuff()
|
||||
{
|
||||
for (; ; ) {
|
||||
}
|
||||
for (size_t i = 0; i < se.len; ){}
|
||||
}
|
9
tests/issue0045.d.ref
Normal file
9
tests/issue0045.d.ref
Normal file
|
@ -0,0 +1,9 @@
|
|||
void doStuff()
|
||||
{
|
||||
for (;;)
|
||||
{
|
||||
}
|
||||
for (size_t i = 0; i < se.len;)
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue