May 12, 2006
http://d.puremagic.com/bugzilla/show_bug.cgi?id=137

           Summary: std.format.doFormat doesn't like arrays of static arrays
           Product: D
           Version: 0.157
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: minor
          Priority: P3
         Component: Phobos
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: deewiant@gmail.com


private import std.stdio;

void main() {
        const int[ ][] foo = [[1, 3], [2, 4]];
        const int[2][] bar = [[1, 3], [2, 4]];

        writefln(foo);
        writefln(bar);
}

--

The first call to writefln outputs "[[1,3],[2,4]]", the second "[Error: std.format formatArg".

Given that outputting plain static arrays works fine, there doesn't seem to be a good reason why this shouldn't.

Of course, this is easy to work around, for instance by outputting each static array separately in a foreach loop.


--