I have no reduced test case yet. Unzip the dmd 2.049 release. Add the following lines to std/typecons.d: -------------------- struct Tuple(T...) { + static string test() + { + enum s = ""; + return s.empty ? ";" : ";"; // (316) + } + mixin(test()); // (318) public: -------------------- Then, compiling certain modules fails depending on the order of compilation: -------------------- % dmd -c std/string std/concurrency std/typecons.d(316): Error: cannot evaluate empty("") at compile time std/typecons.d(318): Error: cannot evaluate test() at compile time std/typecons.d(318): Error: argument to mixin must be a string, not (test()) % dmd -c std/concurrency std/string % _ -------------------- The error didn't occur if I modified std.string.indexOf() as follows: -------------------- sizediff_t indexOf(Char1, Char2)(in Char1[] s, in Char2[] sub, CaseSensitive cs = CaseSensitive.yes) { if (cs == CaseSensitive.yes) { static if (Char1.sizeof == Char2.sizeof) { - immutable result = s.length - std.algorithm.find(s, sub).length; + immutable result = 0; return result == s.length ? -1 : result; -------------------- This bug is no longer triggered in phobos since changeset 2032. http://svn.dsource.org/projects/phobos/trunk@2032
Since the bug is no longer triggered since an old SVN commit, I think that we can consider this resolved.