http://d.puremagic.com/issues/show_bug.cgi?id=8741
Summary: [CTFE] Incorrect static array assign results in constructor Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: major Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: peter.alexander...@gmail.com --- Comment #0 from Peter Alexander <peter.alexander...@gmail.com> 2012-09-30 16:42:16 PDT --- struct Vec2 { this(float x) { m[0] = x; m[1] = x; } float[2] m; static Vec2 zeroes = Vec2(0); } void main() { import std.stdio; writeln(Vec2.zeroes); } Output is: Vec2([0, nan]) http://dpaste.dzfl.pl/77058efc Using two parameters for the constructor makes the bug go away: http://dpaste.dzfl.pl/7ea20ba0 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------