mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #515
This commit is contained in:
parent
7659b1ae1a
commit
41e8c05558
4 changed files with 20 additions and 1 deletions
|
@ -224,7 +224,7 @@ private:
|
|||
else if (currentIs(tok!"return"))
|
||||
{
|
||||
writeToken();
|
||||
if (!currentIs(tok!";") && !currentIs(tok!")"))
|
||||
if (!currentIs(tok!";") && !currentIs(tok!")") && !currentIs(tok!"{"))
|
||||
write(" ");
|
||||
}
|
||||
else if (currentIs(tok!"with"))
|
||||
|
|
7
tests/allman/issue0515.d.ref
Normal file
7
tests/allman/issue0515.d.ref
Normal file
|
@ -0,0 +1,7 @@
|
|||
struct S
|
||||
{
|
||||
ref S foo() return
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
7
tests/issue0515.d
Normal file
7
tests/issue0515.d
Normal file
|
@ -0,0 +1,7 @@
|
|||
struct S
|
||||
{
|
||||
ref S foo() return
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
5
tests/otbs/issue0515.d.ref
Normal file
5
tests/otbs/issue0515.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
|||
struct S {
|
||||
ref S foo() return {
|
||||
return this;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue