mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-29 06:39:55 +03:00
Fix #59
This commit is contained in:
parent
3d919d191d
commit
0d496129be
3 changed files with 32 additions and 1 deletions
|
@ -673,7 +673,8 @@ private:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (index > 0 && !justAddedExtraNewline && !peekBackIs(tok!"{") && !peekBackIs(tok!"}"))
|
if (index > 0 && !justAddedExtraNewline && !peekBackIs(tok!"{")
|
||||||
|
&& !peekBackIs(tok!"}") && !peekBackIs(tok!";"))
|
||||||
{
|
{
|
||||||
if (config.braceStyle == BraceStyle.otbs)
|
if (config.braceStyle == BraceStyle.otbs)
|
||||||
write(" ");
|
write(" ");
|
||||||
|
|
15
tests/issue0059.d
Normal file
15
tests/issue0059.d
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extern (C++) FuncDeclaration buildXopEquals(StructDeclaration sd, Scope* sc)
|
||||||
|
{
|
||||||
|
if (!needOpEquals(sd))
|
||||||
|
return null; // bitwise comparison would work
|
||||||
|
//printf("StructDeclaration::buildXopEquals() %s\n", sd->toChars());
|
||||||
|
if (Dsymbol eq = search_function(sd, Id.eq))
|
||||||
|
{
|
||||||
|
if (FuncDeclaration fd = eq.isFuncDeclaration())
|
||||||
|
{
|
||||||
|
TypeFunction tfeqptr;
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
15
tests/issue0059.d.ref
Normal file
15
tests/issue0059.d.ref
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
extern (C++) FuncDeclaration buildXopEquals(StructDeclaration sd, Scope* sc)
|
||||||
|
{
|
||||||
|
if (!needOpEquals(sd))
|
||||||
|
return null; // bitwise comparison would work
|
||||||
|
//printf("StructDeclaration::buildXopEquals() %s\n", sd->toChars());
|
||||||
|
if (Dsymbol eq = search_function(sd, Id.eq))
|
||||||
|
{
|
||||||
|
if (FuncDeclaration fd = eq.isFuncDeclaration())
|
||||||
|
{
|
||||||
|
TypeFunction tfeqptr;
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue