http://d.puremagic.com/issues/show_bug.cgi?id=6174
--- Comment #9 from Kenji Hara <k.hara...@gmail.com> 2012-10-08 05:35:43 PDT --- (In reply to comment #8) > 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() {} Hmm, it's interesting. The accessed memory through the reference 'f' would specify a part of the constructed fields, and compiler would be able to detect it in statically. Please put in a new report. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------