[Issue 22813] New: [REG 2.079.1] recursive template expansion
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Feb 22 18:45:25 UTC 2022
    
    
  
https://issues.dlang.org/show_bug.cgi?id=22813
          Issue ID: 22813
           Summary: [REG 2.079.1] recursive template expansion
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: tim.dlang at t-online.de
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)`
--
    
    
More information about the Digitalmars-d-bugs
mailing list