[Issue 13630] New: Senseless error with foreach over variadic list
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Oct 17 08:04:02 PDT 2014
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: nobody at puremagic.com
Reporter: temtaime at gmail.com
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;
--
More information about the Digitalmars-d-bugs
mailing list