[Issue 24366] New: [REG]static foreach can drop last element with alias reassignment
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Feb 1 20:03:57 UTC 2024
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 at puremagic.com
Reporter: crazymonkyyy at 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)
```
--
More information about the Digitalmars-d-bugs
mailing list