diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 753a0f3..ee36f40 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -473,7 +473,7 @@ private: else if (!currentIs(tok!"{")) write(" "); } - else if (!currentIs(tok!"{")) + else if (!currentIs(tok!"{") && !currentIs(tok!"in") && !currentIs(tok!"out")) { if (currentIs(tok!")") && indents.topIs(tok!",")) indents.pop(); diff --git a/tests/allman/issue0361.d.ref b/tests/allman/issue0361.d.ref new file mode 100644 index 0000000..30c7f2e --- /dev/null +++ b/tests/allman/issue0361.d.ref @@ -0,0 +1,15 @@ +void foo() /**/ +in +{ +} +body +{ +} + +void bar() /**/ +out +{ +} +body +{ +} diff --git a/tests/issue0361.d b/tests/issue0361.d new file mode 100644 index 0000000..30c7f2e --- /dev/null +++ b/tests/issue0361.d @@ -0,0 +1,15 @@ +void foo() /**/ +in +{ +} +body +{ +} + +void bar() /**/ +out +{ +} +body +{ +} diff --git a/tests/otbs/issue0361.d.ref b/tests/otbs/issue0361.d.ref new file mode 100644 index 0000000..7e2b562 --- /dev/null +++ b/tests/otbs/issue0361.d.ref @@ -0,0 +1,11 @@ +void foo() /**/ +in { +} +body { +} + +void bar() /**/ +out { +} +body { +}