Bug 20356 – exceeding template expansion limits

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-11-05T11:31:51Z
Last change time
2019-11-06T11:48:32Z
Keywords
pull
Assigned to
No Owner
Creator
Robert Schadek

Comments

Comment #0 by rschadek — 2019-11-05T11:31:51Z
When I compare a certain struct in one of my code bases I get a "recursive expansion" error in dtemplate.d:7249 But this is false. I just hit the limit of 300 allowed nestings. 300 seems to be arbitrary, and all other limits I could find are set to 500. I have a PR already in the works, that makes my code compile.
Comment #1 by rschadek — 2019-11-05T12:04:14Z
Comment #2 by dlang-bot — 2019-11-06T09:04:28Z
@burner updated dlang/dmd pull request #10538 "Fix #20356 raises recursive expansion limit" fixing this issue: - Fix Issue 20356 raises recursive expansion limit * Raises the limit from 300 to 500 and gives clearer error msg. * make the test give the right error msg * moved the constant to globals.Global https://github.com/dlang/dmd/pull/10538
Comment #3 by dlang-bot — 2019-11-06T11:48:32Z
dlang/dmd pull request #10538 "Fix #20356 raises recursive expansion limit" was merged into stable: - b4a814c02a2bfdf048440ac70a6e93fff596110f by Robert Schadek: Fix Issue 20356 raises recursive expansion limit * Raises the limit from 300 to 500 and gives clearer error msg. * make the test give the right error msg * moved the constant to globals.Global * changed some more constants * rename https://github.com/dlang/dmd/pull/10538