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.
(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.
I hit this bug when I wrote a Japanese language morphological analysis library (http://bitbucket.org/repeatedly/scrap/src/tip/tinysegmenter.d). I voted.
Mass migration of bugs marked as x86-64 to just x86. The platform run on isn't what's relevant, it's if the app is a 32 or 64 bit app.
Most likely a druntime string comparison issue.
This bug appears to be the same as bug 7512, which has been fixed in git. Please verify.
*** This issue has been marked as a duplicate of issue 7512 ***