mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-28 14:19:56 +03:00
Fix #142
This commit is contained in:
parent
bb3ee5df18
commit
74400b677c
8 changed files with 13 additions and 2 deletions
|
@ -220,7 +220,7 @@ private:
|
||||||
{
|
{
|
||||||
writeToken();
|
writeToken();
|
||||||
if (index < tokens.length && (currentIs(tok!"identifier")
|
if (index < tokens.length && (currentIs(tok!"identifier")
|
||||||
|| isBasicType(current.type) || currentIs(tok!"@")))
|
|| isBasicType(current.type) || currentIs(tok!"@") || currentIs(tok!"if")))
|
||||||
{
|
{
|
||||||
write(" ");
|
write(" ");
|
||||||
}
|
}
|
||||||
|
@ -1385,7 +1385,7 @@ const pure @safe @nogc:
|
||||||
auto t = tokens[i + index].type;
|
auto t = tokens[i + index].type;
|
||||||
return t == tok!"for" || t == tok!"foreach" || t == tok!"foreach_reverse"
|
return t == tok!"for" || t == tok!"foreach" || t == tok!"foreach_reverse"
|
||||||
|| t == tok!"while" || t == tok!"if" || t == tok!"out"
|
|| t == tok!"while" || t == tok!"if" || t == tok!"out"
|
||||||
|| t == tok!"catch" || t == tok!"with";
|
|| t == tok!"catch" || t == tok!"with" || t == tok!"synchronized";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
4
tests/allman/issue0142.d.ref
Normal file
4
tests/allman/issue0142.d.ref
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
class Bar(A) : Foo if (isFloating!A)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
4
tests/issue0142.d
Normal file
4
tests/issue0142.d
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
class Bar(A) : Foo if (isFloating!A)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
3
tests/otbs/issue0142.d.ref
Normal file
3
tests/otbs/issue0142.d.ref
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
class Bar(A) : Foo if (isFloating!A) {
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue