http://d.puremagic.com/issues/show_bug.cgi?id=7473
Summary: [CTFE] Non-ref argument behaves as if it's a ref argument Product: D Version: D2 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: youx...@gmail.com --- Comment #0 from Hisayuki Mima <youx...@gmail.com> 2012-02-10 03:32:58 JST --- The following code cannot be compiled by dmd v2.057 and v2.058(DEBUG). struct S{ int i; } static assert({ S s = S(1); assert(s.i == 1); fun(s); assert(s.i == 1); // fails!! return true; }()); void fun(S s){ s.i = 2; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------