Comment #0 by Justin.SpahrSummers — 2010-06-16T23:34:22Z
void main () {
int[dstring] foo;
foo = [
"hello"d : 5
];
assert("hello"d in foo);
}
This assertion fails on dmd 2.047 on OS X. Using foo["hello"d] = 5; or changing the key type to string works.
Comment #1 by Justin.SpahrSummers — 2010-06-16T23:36:37Z
(In reply to comment #0)
> void main () {
> int[dstring] foo;
>
> foo = [
> "hello"d : 5
> ];
>
> assert("hello"d in foo);
> }
>
> This assertion fails on dmd 2.047 on OS X. Using foo["hello"d] = 5; or changing
> the key type to string works.
Forgot to add that the keys and values are still iterable with foreach() - it's just lookup by hash (index or "in" syntax) that fails.