This commit is contained in:
Hackerpilot 2016-01-22 19:06:09 -08:00
parent e2d23726b9
commit 0eea53a628
4 changed files with 20 additions and 0 deletions

View file

@ -898,6 +898,12 @@ private:
indents.push(tok!"else");
newline();
}
else if (currentIs(tok!"{") && indents.topAre(tok!"static", tok!"if"))
{
indents.pop();
indents.pop();
indents.push(tok!"else");
}
}
void formatKeyword()

View file

@ -0,0 +1,5 @@
static if (condition)
int declaration;
else
{
}

5
tests/issue0225.d Normal file
View file

@ -0,0 +1,5 @@
static if (condition)
int declaration;
else
{
}

View file

@ -0,0 +1,4 @@
static if (condition)
int declaration;
else {
}