mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-29 22:59:57 +03:00
Fix #117
This commit is contained in:
parent
92ee9f13a8
commit
cf32df2acb
4 changed files with 19 additions and 2 deletions
|
@ -746,8 +746,8 @@ private:
|
||||||
case tok!"~":
|
case tok!"~":
|
||||||
if (peekIs(tok!"this"))
|
if (peekIs(tok!"this"))
|
||||||
{
|
{
|
||||||
if (!(index == 0 || peekBackIs(tok!"{") || peekBackIs(tok!"}")
|
if (!(index == 0 || peekBackIs(tok!"{", true) || peekBackIs(tok!"}", true)
|
||||||
|| peekBackIs(tok!";")))
|
|| peekBackIs(tok!";", true)))
|
||||||
{
|
{
|
||||||
write(" ");
|
write(" ");
|
||||||
}
|
}
|
||||||
|
|
7
tests/allman/issue0117.d.ref
Normal file
7
tests/allman/issue0117.d.ref
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
int i; // Comment
|
||||||
|
~this()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
5
tests/issue0117.d
Normal file
5
tests/issue0117.d
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
int i; // Comment
|
||||||
|
~this() {}
|
||||||
|
}
|
5
tests/otbs/issue0117.d.ref
Normal file
5
tests/otbs/issue0117.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
struct A {
|
||||||
|
int i; // Comment
|
||||||
|
~this() {
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue