Fix formatting issue

This commit is contained in:
Hackerpilot 2016-01-20 02:58:42 -08:00
parent e8a6b40432
commit cac45e3607
7 changed files with 11 additions and 11 deletions

View File

@ -288,10 +288,8 @@ private:
case conditional_newline:
immutable l = currentLineLength + betweenParenLength(tokens[index + 1 .. $]);
if (l > config.dfmt_soft_max_line_length)
{
newline();
}
else
else if (peekBackIs(tok!")"))
write(" ");
break;
case always_newline:
@ -304,7 +302,7 @@ private:
pushWrapIndent(tok!"!");
newline();
}
else
else if (peekBackIs(tok!")"))
write(" ");
break;
case always_newline_indent:
@ -542,7 +540,7 @@ private:
write(" ");
}
else if ((peekIsKeyword() || peekIs(tok!"@")) && spaceAfterParens
&& !peekIs(tok!"in") && !peekIs(tok!"is"))
&& !peekIs(tok!"in") && !peekIs(tok!"is") && !peekIs(tok!"if"))
{
writeToken();
write(" ");

View File

@ -1,4 +1,5 @@
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName if (is(T : Bar))
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName
if (is(T : Bar))
{
void foo()
{

View File

@ -1,4 +1,5 @@
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName if (is(T : Bar)) {
class Foo(T) : FirstInterfaceWithVeryLongName, SecondInterfaceWithVeryLongName
if (is(T : Bar)) {
void foo() {
}
}