Bug 19585 – Invalid recursive template expansion error

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-01-15T08:12:37Z
Last change time
2023-01-01T06:25:02Z
Assigned to
No Owner
Creator
Benjamin Schaaf

Comments

Comment #0 by ben.schaaf — 2019-01-15T08:12:37Z
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.
Comment #1 by ibuclaw — 2022-12-27T18:01:45Z
*** This issue has been marked as a duplicate of issue 18646 ***
Comment #2 by dlang-bot — 2022-12-28T12:46:30Z
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
Comment #3 by dlang-bot — 2023-01-01T06:25:02Z
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