Merge pull request from kotet/issue-361

Fix 
merged-on-behalf-of: Basile-z <Basile-z@users.noreply.github.com>
This commit is contained in:
The Dlang Bot 2019-05-14 10:41:32 +02:00 committed by GitHub
commit 4fea171d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 42 additions and 1 deletions

View File

@ -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();

View File

@ -0,0 +1,15 @@
void foo() /**/
in
{
}
body
{
}
void bar() /**/
out
{
}
body
{
}

15
tests/issue0361.d Normal file
View File

@ -0,0 +1,15 @@
void foo() /**/
in
{
}
body
{
}
void bar() /**/
out
{
}
body
{
}

View File

@ -0,0 +1,11 @@
void foo() /**/
in {
}
body {
}
void bar() /**/
out {
}
body {
}