https://issues.dlang.org/show_bug.cgi?id=13630
Issue ID: 13630
Summary: Senseless error with foreach over variadic list
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: critical
Priority: P1
Component: DMD
Assignee: [email protected]
Reporter: [email protected]
struct S(T) {
T[3] arr;
this(A...)(auto ref in A args) {
auto p = arr.ptr;
foreach(ref v; args)
*p = 0;
}
}
void main() {
enum A = S!float(1);
}
Error: Array length mismatch assigning [0..0] to [0..3]
called from here: (S!float __ctmp1495 = S;
--