Versions: 2.081.1, 2.083.0 (What I had installed) The following code produces a compiler error when it shouldn't: struct A { M2 stdin; } mixin template Handle(T, T invalid_value = T.init) {} struct M1 { mixin Handle!(size_t); } struct M2 { mixin Handle!(M1); } template `foo.Handle(T, T invalid_value = T.init)` recursive template expansion Not using the struct doesn't produce an error, so clearly expanding M2 works perfectly. Using M1.init instead of relying on the default parameter doesn't produce this issue.
*** This issue has been marked as a duplicate of issue 18646 ***
dlang/dmd pull request #14745 "fix Issue 18646 - [REG 2.079.0] Recursive template expansion incorrectly reported" was merged into stable: - 03a9ede296fcf3e881a17564471093fafba0416e by Iain Buclaw: fix Issue 19585 - Invalid recursive template expansion error https://github.com/dlang/dmd/pull/14745
dlang/dmd pull request #14765 "merge stable" was merged into master: - 259c5fb785d14e83848d5262eb88f4f6fe4832dd by Iain Buclaw: fix Issue 19585 - Invalid recursive template expansion error https://github.com/dlang/dmd/pull/14765