mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #57
This commit is contained in:
parent
21515ef614
commit
2fa90ff3ba
3 changed files with 32 additions and 0 deletions
|
@ -382,6 +382,11 @@ private:
|
|||
case tok!"~":
|
||||
if (peekIs(tok!"this"))
|
||||
{
|
||||
if (!(index == 0 || peekBackIs(tok!"{") || peekBackIs(tok!"}")
|
||||
|| peekBackIs(tok!";")))
|
||||
{
|
||||
write(" ");
|
||||
}
|
||||
writeToken();
|
||||
break;
|
||||
}
|
||||
|
|
12
tests/issue0057.d
Normal file
12
tests/issue0057.d
Normal file
|
@ -0,0 +1,12 @@
|
|||
~this()
|
||||
{
|
||||
}
|
||||
|
||||
extern(C++)~this()
|
||||
{ global.gag = oldgag;
|
||||
}
|
||||
|
||||
struct S
|
||||
{public~this()
|
||||
{
|
||||
}}
|
15
tests/issue0057.d.ref
Normal file
15
tests/issue0057.d.ref
Normal file
|
@ -0,0 +1,15 @@
|
|||
~this()
|
||||
{
|
||||
}
|
||||
|
||||
extern (C++) ~this()
|
||||
{
|
||||
global.gag = oldgag;
|
||||
}
|
||||
|
||||
struct S
|
||||
{
|
||||
public ~this()
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue