mirror of
https://github.com/dlang-community/dfmt.git
synced 2025-04-25 21:00:03 +03:00
Fix #38.
This commit is contained in:
parent
8f11f3291f
commit
42ba457439
3 changed files with 18 additions and 1 deletions
|
@ -333,6 +333,10 @@ private:
|
|||
writeToken();
|
||||
writeParens(true);
|
||||
break;
|
||||
case tok!"is":
|
||||
writeToken();
|
||||
write(" ");
|
||||
break;
|
||||
default:
|
||||
if (index + 1 < tokens.length)
|
||||
{
|
||||
|
@ -395,8 +399,11 @@ private:
|
|||
case tok!"(":
|
||||
writeParens(true);
|
||||
break;
|
||||
case tok!"@":
|
||||
case tok!"!":
|
||||
if (peekIs(tok!"is"))
|
||||
write(" ");
|
||||
goto case;
|
||||
case tok!"@":
|
||||
case tok!"...":
|
||||
case tok!"[":
|
||||
case tok!"++":
|
||||
|
|
5
tests/issue0038.d
Normal file
5
tests/issue0038.d
Normal file
|
@ -0,0 +1,5 @@
|
|||
static int isInfinity(double r)
|
||||
{
|
||||
auto a = r is double.infinity || r is-double.infinity;
|
||||
auto b = r is double.infinity || r!is-double.infinity;
|
||||
}
|
5
tests/issue0038.d.ref
Normal file
5
tests/issue0038.d.ref
Normal file
|
@ -0,0 +1,5 @@
|
|||
static int isInfinity(double r)
|
||||
{
|
||||
auto a = r is double.infinity || r is -double.infinity;
|
||||
auto b = r is double.infinity || r !is -double.infinity;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue