http://d.puremagic.com/issues/show_bug.cgi?id=9356
Summary: -inline with inout and append generates wrong code Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: d...@me.com --- Comment #0 from Jacob Carlborg <d...@me.com> 2013-01-20 04:07:46 PST --- The assert in "foo" passes, which it obviously shouldn't. inout(char)[] bar (inout(char)[] a) { return a; } void foo (string str) { string result; result ~= bar(str); assert(result == "!"); } void main () { foo("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"); } If I remove "inout" in "bar" or the append in "foo" the code work as expected. What "result" will actually be depends on the length of the string passed to "foo". I've only tried this with on Mac OS X, both 32 and 64bit. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------