www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4337] New: Associative array assignment with dstring keys breaks lookup

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337

           Summary: Associative array assignment with dstring keys breaks
                    lookup
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: Justin.SpahrSummers gmail.com



2010-06-17 01:34:22 CDT ---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337




2010-06-17 01:36:37 CDT ---

 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: -------
Jun 16 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337


Masahiro Nakagawa <repeatedly gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |repeatedly gmail.com
           Severity|normal                      |major



13:35:24 PDT ---
I hit this bug when I wrote a Japanese language morphological analysis library
(http://bitbucket.org/repeatedly/scrap/src/tip/tinysegmenter.d).

I voted.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 06 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337


Brad Roberts <braddr puremagic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|x86_64                      |x86



---
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.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 06 2011
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yebblies gmail.com
          Component|DMD                         |druntime
           Platform|x86                         |All
         OS/Version|Mac OS X                    |All



Most likely a druntime string comparison issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 02 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337


hsteoh quickfur.ath.cx changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hsteoh quickfur.ath.cx



This bug appears to be the same as bug 7512, which has been fixed in git.
Please verify.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 13 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4337


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 7512 ***

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