diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index d351285..669f3a3 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -763,7 +763,7 @@ private: formatAt(); break; case tok!"!": - if (peekIs(tok!"is") && !peekBackIsOneOf(false, tok!"(", tok!"=")) + if ((peekIs(tok!"is") || peekIs(tok!"in")) && !peekBackIsOneOf(false, tok!"(", tok!"=")) write(" "); goto case; case tok!"...": diff --git a/tests/allman/issue0136.d.ref b/tests/allman/issue0136.d.ref new file mode 100644 index 0000000..c5d8941 --- /dev/null +++ b/tests/allman/issue0136.d.ref @@ -0,0 +1,4 @@ +unittest +{ + auto result = name !in aa; +} diff --git a/tests/issue0136.d b/tests/issue0136.d new file mode 100644 index 0000000..076bab8 --- /dev/null +++ b/tests/issue0136.d @@ -0,0 +1,4 @@ +unittest +{ + auto result = name !in aa; +} diff --git a/tests/otbs/issue0136.d.ref b/tests/otbs/issue0136.d.ref new file mode 100644 index 0000000..9f04038 --- /dev/null +++ b/tests/otbs/issue0136.d.ref @@ -0,0 +1,3 @@ +unittest { + auto result = name !in aa; +}