Skip to content

Commit

Permalink
Merge pull request #437 from dlang-community/issue-436
Browse files Browse the repository at this point in the history
Fix #436
merged-on-behalf-of: Brian Schott <[email protected]>
  • Loading branch information
dlang-bot authored Feb 22, 2019
2 parents b34acc9 + b4e97d3 commit 54a84bd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/dfmt/formatter.d
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,18 @@ private:
{
writeToken();
write(" ");
while (index < tokens.length)
{
if (currentIs(tok!"("))
formatLeftParenOrBracket();
else if (currentIs(tok!")"))
{
formatRightParen();
break;
}
else
writeToken();
}
}
else if (((isBlockHeader() || currentIs(tok!"version")) && peekIs(tok!"("))
|| (currentIs(tok!"debug") && peekIs(tok!"{")))
Expand Down
1 change: 1 addition & 0 deletions tests/allman/issue0436.d.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern (Objective-C) int a;
1 change: 1 addition & 0 deletions tests/issue0436.d
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern (Objective-C) int a;
1 change: 1 addition & 0 deletions tests/otbs/issue0436.d.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern (Objective-C) int a;

0 comments on commit 54a84bd

Please sign in to comment.