diff --git a/src/dfmt.d b/src/dfmt.d index 0359721..c413dd4 100644 --- a/src/dfmt.d +++ b/src/dfmt.d @@ -505,8 +505,11 @@ private: writeToken(); if (currentIs(tok!"}", false)) tempIndent = 0; - else if (!currentIs(tok!")", false) && !currentIs(tok!"]", false)) + else if (!currentIs(tok!")", false) && !currentIs(tok!"]", false) + && !currentIs(tok!"comment", false)) + { write(" "); + } } regenLineBreakHintsIfNecessary(index - 1); break; diff --git a/tests/issue0017.d.ref b/tests/issue0017.d.ref index 4c5d68f..8a32cec 100644 --- a/tests/issue0017.d.ref +++ b/tests/issue0017.d.ref @@ -1,3 +1,3 @@ -immutable NameId[] namesA = [{"Aacgr", 0x00386}, // GREEK CAPITAL LETTER ALPHA WITH TONOS -{"aacgr", 0x003AC}, // GREEK SMALL LETTER ALPHA WITH TONOS +immutable NameId[] namesA = [{"Aacgr", 0x00386}, // GREEK CAPITAL LETTER ALPHA WITH TONOS +{"aacgr", 0x003AC}, // GREEK SMALL LETTER ALPHA WITH TONOS ]; diff --git a/tests/issue0044.d b/tests/issue0044.d new file mode 100644 index 0000000..c27473a --- /dev/null +++ b/tests/issue0044.d @@ -0,0 +1,6 @@ +enum Sizeok : int +{ + SIZEOKnone, // size of aggregate is not computed yet + SIZEOKdone, // size of aggregate is set correctly + SIZEOKfwd, // error in computing size of aggregate +} diff --git a/tests/issue0044.d.ref b/tests/issue0044.d.ref new file mode 100644 index 0000000..3131959 --- /dev/null +++ b/tests/issue0044.d.ref @@ -0,0 +1,6 @@ +enum Sizeok : int +{ + SIZEOKnone, // size of aggregate is not computed yet + SIZEOKdone, // size of aggregate is set correctly + SIZEOKfwd, // error in computing size of aggregate +}