http://d.puremagic.com/issues/show_bug.cgi?id=6098
Andrej Mitrovic <andrej.mitrov...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|DMD |Phobos Summary|CTFE static array |Static array corruption of |corruption of data |data --- Comment #1 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-06-03 06:25:49 PDT --- Actually this has nothing to do with CTFE: import std.math; import std.stdio; import std.range; auto makeSine() { double[10] result; //~ double[] result = new double[](TableSize); // this fixes the issue foreach (index, ref sample; result) { sample = cast(double)sin((cast(double)index / cast(double)10) * PI * 2.); } writeln(result); return cycle(result); } void main() { auto sineTable = makeSine(); writeln(take(sineTable, 10)); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------