mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #154
This commit is contained in:
parent
98686f7dd1
commit
c194335be9
4 changed files with 20 additions and 1 deletions
|
@ -709,7 +709,8 @@ private:
|
|||
write(" ");
|
||||
break;
|
||||
case tok!"is":
|
||||
if (!peekBackIsOneOf(false, tok!"!", tok!"(", tok!",", tok!"}", tok!"=") && !peekBackIsKeyword())
|
||||
if (!peekBackIsOneOf(false, tok!"!", tok!"(", tok!",", tok!"}", tok!"=",
|
||||
tok!"&&", tok!"||") && !peekBackIsKeyword())
|
||||
write(" ");
|
||||
writeToken();
|
||||
if (!currentIs(tok!"(") && !currentIs(tok!"{"))
|
||||
|
|
7
tests/allman/issue0154.d.ref
Normal file
7
tests/allman/issue0154.d.ref
Normal file
|
@ -0,0 +1,7 @@
|
|||
class Foo(T) if (is(T : Bar) && is(T : Baz))
|
||||
{
|
||||
}
|
||||
|
||||
class Foo(T) if (is(T : Bar) || is(T : Baz))
|
||||
{
|
||||
}
|
6
tests/issue0154.d
Normal file
6
tests/issue0154.d
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
class Foo(T) if (is(T : Bar) && is(T : Baz))
|
||||
{}
|
||||
|
||||
class Foo(T) if (is(T : Bar) || is(T : Baz))
|
||||
{}
|
5
tests/otbs/issue0154.d.ref
Normal file
5
tests/otbs/issue0154.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
|||
class Foo(T) if (is(T : Bar) && is(T : Baz)) {
|
||||
}
|
||||
|
||||
class Foo(T) if (is(T : Bar) || is(T : Baz)) {
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue