[Issue 4337] Associative array assignment with dstring keys breaks lookup

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 16 23:36:38 PDT 2010


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



--- Comment #1 from Justin Spahr-Summers <Justin.SpahrSummers at gmail.com> 2010-06-17 01:36:37 CDT ---
(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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list