Associative Array - where's my error?
Jesse Phillips
jessekphillips+D at gmail.com
Thu Apr 28 10:18:28 PDT 2011
Andrej Mitrovic Wrote:
> There's more issues with string assignments. For example see this:
> http://d.puremagic.com/issues/show_bug.cgi?id=5059
>
> In that example, key.name() returns a string. But "key" itself will be
> reused on every loop, and the string that key holds will be
> overwritten on each pass.
Commented on your bug. It is because of a cast(string) inside the KeySequence's opApply. My point still stands, to!() is safer.
> I haven't gotten any comments on that bug report yet. I'm not sure if
> it really is a bug, but it certainly is unexpected that an immutable
> string gets overwritten.
More information about the Digitalmars-d-learn
mailing list