http://d.puremagic.com/issues/show_bug.cgi?id=2479
Don <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Phobos |DMD Summary|sformat is broken |Badcode regression: closure | |corrupts _argptr value --- Comment #5 from Don <[email protected]> 2009-10-15 05:21:36 PDT --- Reduced test case. This does not seem to be a Phobos bug. If you remove any reference to s from the delegate (so that it stops being a closure), the code works correctly. ---- void doFormat(void delegate() myputc, void * argptr){ assert(!(*cast(string*)argptr is null)); } void sformat(string s, ...){ void putc() { assert(s[0]==s[0]); } doFormat(&putc, _argptr); } void main(){ sformat("xxx", "hi"); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
