Skip to content

Commit

Permalink
Fix #219
Browse files Browse the repository at this point in the history
  • Loading branch information
Hackerpilot committed Jan 22, 2016
1 parent 98f443d commit 2686578
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dfmt/formatter.d
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,8 @@ private:
if (currentIs(tok!"("))
{
writeParens(false);
if (tokens[index].type == tok!"{")
return;
if (index < tokens.length && tokens[index - 1].line < tokens[index].line)
newline();
else
Expand Down
6 changes: 6 additions & 0 deletions tests/allman/issue0219.d.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@OneOf("group1")
{
JSONValue[string] fred;
bool mertz;
bool ethel;
}
6 changes: 6 additions & 0 deletions tests/issue0219.d
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@OneOf("group1")
{
JSONValue[string] fred;
bool mertz;
bool ethel;
}
5 changes: 5 additions & 0 deletions tests/otbs/issue0219.d.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@OneOf("group1") {
JSONValue[string] fred;
bool mertz;
bool ethel;
}

0 comments on commit 2686578

Please sign in to comment.