I can't reproduce the bug, code works for me with 2.047 on Linux. Here's the relevant code:

void writeln(T...)(T args)
if (T.length == 1 && is(typeof(args[0]) : const(char)[]))
{
    enforce(fprintf(.stdout.p.handle, "%*s\n",
        args[0].length, args[0].ptr) >= 0);
}

What is wrong with it?


Andrei

On 06/10/2010 07:45 AM, Richard Webb wrote:

Using 2.047 on Windows 2008, i see the code

        char[3] tmp = ['a', 'b', 'c'];
        writeln(tmp);

print abc<randombytes>  (in debug builds at least).

possibly because the change in
http://www.dsource.org/projects/phobos/changeset/1611 doesn't handle non-null
terminated character arrays?


_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta

Reply via email to