Bug 22813 – [REG 2.079.1] recursive template expansion

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-02-22T18:45:25Z
Last change time
2023-01-01T06:25:08Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Tim

Comments

Comment #0 by tim.dlang — 2022-02-22T18:45:25Z
The following code compiled with DMD 2.078.1, but does not compile since DMD 2.079.1: struct Template(int i) { } uint f() { Template!(1) x; return 0; } immutable constant = f(); alias X = Template!constant; DMD now prints the following error: test.d(4): Error: struct `test.Template(int i)` recursive template expansion test.d(4): while looking for match for `Template!1` test.d(7): called from here: `f()` test.d(8): while looking for match for `Template!(constant)`
Comment #1 by ibuclaw — 2022-12-27T18:02:41Z
*** This issue has been marked as a duplicate of issue 18646 ***
Comment #2 by dlang-bot — 2022-12-28T12:46:31Z
dlang/dmd pull request #14745 "fix Issue 18646 - [REG 2.079.0] Recursive template expansion incorrectly reported" was merged into stable: - 01f124c2787703894aa5ad2b69b85a4f53261a4e by Iain Buclaw: fix Issue 22813 - [REG 2.079.1] recursive template expansion https://github.com/dlang/dmd/pull/14745
Comment #3 by dlang-bot — 2023-01-01T06:25:08Z
dlang/dmd pull request #14765 "merge stable" was merged into master: - ae324181b752f3d3158b697749541360b1ca96dc by Iain Buclaw: fix Issue 22813 - [REG 2.079.1] recursive template expansion https://github.com/dlang/dmd/pull/14765