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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 10 09:42:42 PST 2007


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


dvdfrdmn at users.sf.net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dvdfrdmn at users.sf.net




------- Comment #6 from dvdfrdmn at users.sf.net  2007-02-10 11:42 -------
The patch in #2 does not take alignment of the value into account.  The
following prints "[a:50331648]"
----
import std.format;
import std.string;
void main()
{
    int[char] m;
    m['a'] = 3;
    assert(find(format("%s",m), "a:3") != -1);
}
----

Attached an example patch that fixes the problem, but I don't think copying
from aaA.d is a good idea.


-- 



More information about the Digitalmars-d-bugs mailing list