mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #60
This commit is contained in:
parent
7f0b3baecb
commit
e737d56d0d
3 changed files with 13 additions and 1 deletions
|
@ -314,7 +314,7 @@ private:
|
|||
else if (current.type == tok!"else")
|
||||
{
|
||||
writeToken();
|
||||
if (current.type == tok!"if")
|
||||
if (current.type == tok!"if" || (current.type == tok!"static" && peekIs(tok!"if")))
|
||||
write(" ");
|
||||
else if (current.type != tok!"{")
|
||||
{
|
||||
|
|
3
tests/issue0060.d
Normal file
3
tests/issue0060.d
Normal file
|
@ -0,0 +1,3 @@
|
|||
static if (a) {}
|
||||
else static if (b) {}
|
||||
else {}
|
9
tests/issue0060.d.ref
Normal file
9
tests/issue0060.d.ref
Normal file
|
@ -0,0 +1,9 @@
|
|||
static if (a)
|
||||
{
|
||||
}
|
||||
else static if (b)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue