mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-29 22:59:57 +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!";")
|
if (current.type == tok!";")
|
||||||
{
|
{
|
||||||
write("; ");
|
if (!(peekIs(tok!";") || peekIs(tok!")")))
|
||||||
currentLineLength += 2;
|
write("; ");
|
||||||
|
else
|
||||||
|
write(";");
|
||||||
index++;
|
index++;
|
||||||
continue;
|
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