https://issues.dlang.org/show_bug.cgi?id=21034

Nick Treleaven <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Nick Treleaven <[email protected]> ---
The assert would fail anyway, because "0123" is immutable data. When you assign
"0" to s, that is different memory and cannot affect c.

Presumably this request is for:

    s = "0";
    s = s ~ "1";
    assert(s.ptr[2] == '\0');

That would cause unnecessary writes when appending a (short) string in a loop
and each null byte is not read.

--

Reply via email to