diff --git a/src/dfmt.d b/src/dfmt.d index 9162eb4..6d7bdb1 100644 --- a/src/dfmt.d +++ b/src/dfmt.d @@ -335,7 +335,8 @@ private: break; case tok!"is": writeToken(); - write(" "); + if (!currentIs(tok!"(")) + write(" "); break; default: if (index + 1 < tokens.length) diff --git a/tests/issue0041.d b/tests/issue0041.d new file mode 100644 index 0000000..ff1d667 --- /dev/null +++ b/tests/issue0041.d @@ -0,0 +1,3 @@ +static if (is (typeof(T.init.apply(fp, null)))) +{ +} diff --git a/tests/issue0041.d.ref b/tests/issue0041.d.ref new file mode 100644 index 0000000..1473c5d --- /dev/null +++ b/tests/issue0041.d.ref @@ -0,0 +1,3 @@ +static if (is(typeof(T.init.apply(fp, null)))) +{ +}