This commit is contained in:
Hackerpilot 2015-05-07 23:51:15 -07:00
parent e16c7bd465
commit 56ea97efbb
4 changed files with 26 additions and 1 deletions

View file

@ -261,7 +261,13 @@ private:
{
if (index < tokens.length && prevTokenEndLine == tokens[index].line)
{
if (!currentIs(tok!"{"))
if (currentIs(tok!"}"))
{
if (indents.topIs(tok!"{"))
indents.pop();
write(" ");
}
else if (!currentIs(tok!"{"))
write(" ");
}
else if (!currentIs(tok!"{"))

View file

@ -0,0 +1,7 @@
void test()
{ /* ignore */ }
void test2()
{
test();
}

7
tests/issue0151.d Normal file
View file

@ -0,0 +1,7 @@
void test()
{ /* ignore */ }
void test2()
{
test();
}

View file

@ -0,0 +1,5 @@
void test() { /* ignore */ }
void test2() {
test();
}