[Issue 6174] Initialize const fixed-size array in constructor
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Oct 7 13:24:29 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6174
--- Comment #8 from bearophile_hugs at eml.cc 2012-10-07 13:12:27 PDT ---
Is this expected? Do you want me to put this in a new bug report?
struct Foo {
int[1] bar;
}
const Foo[1] foos;
static this() {
foreach (i; 0 .. foos.length)
foos[i].bar[i] = 1; // OK
foreach (i, ref f; foos)
f.bar[i] = 1; // Error
}
void main() {}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list