[Issue 2333] Hash initializer does not work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 3 05:14:04 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2333
------- Comment #3 from andrei at metalanguage.com 2008-09-03 07:14 -------
(In reply to comment #1)
> Even more: this program:
>
> import std.stdio;
> void main()
> {
> int[string] foo = ["aaa":1, "bbb":2];
> foo["ccc"] = 3;
> writeln(foo);
> writeln("aaa" in foo);
> writeln("ccc" in foo);
> }
>
> prints this:
>
> [aaa:1,bbb:2,ccc:3]
> 0
> 8F4FB4
>
> when compiled using Windows DMD 2.018.
The last line is fine. "in" returns a pointer.
--
More information about the Digitalmars-d-bugs
mailing list