Brad Roberts <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #2 from Brad Roberts <>  2009-08-29 14:45:40 
PDT ---
A reduced test case (larger, but complete and doesn't import large swaths of
code).  This is a massive reduction of all the irrelevant parts of doFormat
torn away, and sformat reduced a good bit as well.

module bug2479;

import std.stdarg;

void doFormat(void delegate(dchar) myputc, TypeInfo[] arguments, va_list
    string fmt = va_arg!(string)(argptr);
    assert(!(fmt is null)); // fires when it shouldn't.

char[] sformat(char[] s, ...)
    void putc(dchar c) { s[0] = cast(char)c; }

    doFormat(&putc, _arguments, _argptr);
    return s[0 .. 1];

void main()
    char[32] tmp;
    sformat(tmp, "%s", "hi");

Changing putc to not touch 's' causes the va_arg call to succeed an fmt is no
longer null.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to