mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-05-06 18:55:57 +03:00
Fix #79
This commit is contained in:
parent
cade56450c
commit
0ae8eccc2f
3 changed files with 24 additions and 1 deletions
|
@ -438,7 +438,8 @@ private:
|
||||||
{
|
{
|
||||||
indentLevel++;
|
indentLevel++;
|
||||||
writeToken();
|
writeToken();
|
||||||
newline();
|
if (!currentIs(tok!"{"))
|
||||||
|
newline();
|
||||||
}
|
}
|
||||||
else if (peekBackIs(tok!"identifier") && (index <= 1
|
else if (peekBackIs(tok!"identifier") && (index <= 1
|
||||||
|| peekBack2Is(tok!"{", true) || peekBack2Is(tok!"}", true)
|
|| peekBack2Is(tok!"{", true) || peekBack2Is(tok!"}", true)
|
||||||
|
|
11
tests/issue0079.d
Normal file
11
tests/issue0079.d
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
switch (x)
|
||||||
|
{
|
||||||
|
case a:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
case b:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
11
tests/issue0079.d.ref
Normal file
11
tests/issue0079.d.ref
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
unittest
|
||||||
|
{
|
||||||
|
switch (x)
|
||||||
|
{
|
||||||
|
case a:
|
||||||
|
{
|
||||||
|
}
|
||||||
|
case b:
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue