mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #153
This commit is contained in:
parent
c194335be9
commit
4fff6dc635
4 changed files with 19 additions and 1 deletions
|
@ -626,8 +626,9 @@ private:
|
|||
immutable bool a = !currentIs(tok!"version") && !currentIs(tok!"debug");
|
||||
immutable bool b = a
|
||||
|| astInformation.conditionalWithElseLocations.canFindIndex(current.index);
|
||||
immutable bool shouldPushIndent = b
|
||||
immutable bool c = b
|
||||
|| astInformation.conditionalStatementLocations.canFindIndex(current.index);
|
||||
immutable bool shouldPushIndent = c && !(currentIs(tok!"if") && indents.topIsWrap());
|
||||
if (shouldPushIndent)
|
||||
indents.push(current.type);
|
||||
writeToken();
|
||||
|
|
7
tests/allman/issue0153.d.ref
Normal file
7
tests/allman/issue0153.d.ref
Normal file
|
@ -0,0 +1,7 @@
|
|||
class Foo(T) : FirstInterfaceWithVeryLongName,
|
||||
SecondInterfaceWithVeryLongName if (is(T : Bar))
|
||||
{
|
||||
void foo()
|
||||
{
|
||||
}
|
||||
}
|
5
tests/issue0153.d
Normal file
5
tests/issue0153.d
Normal file
|
@ -0,0 +1,5 @@
|
|||
class Foo(T) : FirstInterfaceWithVeryLongName,
|
||||
SecondInterfaceWithVeryLongName if (is(T : Bar)) {
|
||||
void foo() {
|
||||
}
|
||||
}
|
5
tests/otbs/issue0153.d.ref
Normal file
5
tests/otbs/issue0153.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
|||
class Foo(T) : FirstInterfaceWithVeryLongName,
|
||||
SecondInterfaceWithVeryLongName if (is(T : Bar)) {
|
||||
void foo() {
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue