February 01 [Issue 24366] New: [REG]static foreach can drop last element with alias reassignment | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24366 Issue ID: 24366 Summary: [REG]static foreach can drop last element with alias reassignment Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: crazymonkyyy@gmail.com alias seq(T...)=T; template foo(T...){ alias bar=seq!(); static foreach(i,A;T){ alias bar_(alias B:A)=bar; bar=seq!(bar_!A,A); } alias foo=bar; } void main(){ import std; alias foobar=foo!(int,bool,float); foobar.stringof.writeln; } expected: (int,bool,float) actaul: (int,bool) ``` 2.095.1 to 2.100.2: Success with output: (int, bool, float) Since 2.101.2: Success with output: (int, bool) ``` -- |
Copyright © 1999-2021 by the D Language Foundation