This commit is contained in:
Hackerpilot 2015-03-07 22:54:04 -08:00
parent 7f0b3baecb
commit e737d56d0d
3 changed files with 13 additions and 1 deletions

View file

@ -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
View file

@ -0,0 +1,3 @@
static if (a) {}
else static if (b) {}
else {}

9
tests/issue0060.d.ref Normal file
View file

@ -0,0 +1,9 @@
static if (a)
{
}
else static if (b)
{
}
else
{
}