From 6f153bd8a1479a9ab6b545351ebb2a8b213eeb5e Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Thu, 5 Mar 2015 19:40:55 -0800 Subject: [PATCH] Fix #41 --- src/dfmt.d | 3 ++- tests/issue0041.d | 3 +++ tests/issue0041.d.ref | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 tests/issue0041.d create mode 100644 tests/issue0041.d.ref 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)))) +{ +}