This commit is contained in:
Hackerpilot 2015-03-05 19:08:38 -08:00
parent 8f11f3291f
commit 42ba457439
3 changed files with 18 additions and 1 deletions

View File

@ -333,6 +333,10 @@ private:
writeToken(); writeToken();
writeParens(true); writeParens(true);
break; break;
case tok!"is":
writeToken();
write(" ");
break;
default: default:
if (index + 1 < tokens.length) if (index + 1 < tokens.length)
{ {
@ -395,8 +399,11 @@ private:
case tok!"(": case tok!"(":
writeParens(true); writeParens(true);
break; break;
case tok!"@":
case tok!"!": case tok!"!":
if (peekIs(tok!"is"))
write(" ");
goto case;
case tok!"@":
case tok!"...": case tok!"...":
case tok!"[": case tok!"[":
case tok!"++": case tok!"++":

5
tests/issue0038.d Normal file
View 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
View 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;
}