http://d.puremagic.com/issues/show_bug.cgi?id=6039
Summary: C-style initialization of structs doesn't take field initializers into account Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: andrej.mitrov...@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrov...@gmail.com> 2011-05-19 21:43:15 PDT --- import std.stdio; struct S { int a; int b = 2;} void main() { S a = S(1); S b = {1}; writeln([a.tupleof]); // [1, 2] writeln([b.tupleof]); // [1, 0] assert(a == b); // fails } AFAIK there was some talk about deprecating C-style struct initialization, or am I wrong about that? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------