October 19, 2014 [Issue 13630] New: Senseless error with foreach over variadic list | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: temtaime@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; -- |
Copyright © 1999-2021 by the D Language Foundation