[Issue 800] New: writefln() on an associative array fails hard

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 6 12:06:22 PST 2007


http://d.puremagic.com/issues/show_bug.cgi?id=800

           Summary: writefln() on an associative array fails hard
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: deewiant at gmail.com


import std.stdio;

void main() {
        int[int] foo;

        foo[1] = 2;

        writefln("%s", foo);
}

This outputs "[", some seemingly-random numbers including hundreds of zeroes,
and dies in an Access Violation. It looks like it's reading memory in the
completely wrong place, possibly treating the AA as a dynamic array.


-- 



More information about the Digitalmars-d-bugs mailing list