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();
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
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;
}