mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #88
This commit is contained in:
parent
66342a99ee
commit
52eabd4f47
3 changed files with 23 additions and 1 deletions
|
@ -341,9 +341,13 @@ private:
|
|||
case tok!"in":
|
||||
case tok!"is":
|
||||
writeToken();
|
||||
if (!currentIs(tok!"("))
|
||||
if (!currentIs(tok!"(") && !currentIs(tok!"{"))
|
||||
write(" ");
|
||||
break;
|
||||
case tok!"case":
|
||||
writeToken();
|
||||
write(" ");
|
||||
break;
|
||||
default:
|
||||
if (index + 1 < tokens.length)
|
||||
{
|
||||
|
|
9
tests/issue0088.d
Normal file
9
tests/issue0088.d
Normal file
|
@ -0,0 +1,9 @@
|
|||
unittest
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case+1:
|
||||
case-1:
|
||||
case(1):
|
||||
}
|
||||
}
|
9
tests/issue0088.d.ref
Normal file
9
tests/issue0088.d.ref
Normal file
|
@ -0,0 +1,9 @@
|
|||
unittest
|
||||
{
|
||||
switch (x)
|
||||
{
|
||||
case +1:
|
||||
case -1:
|
||||
case (1):
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue