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


--- Comment #0 from Justin Spahr-Summers <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



--- Comment #1 from Justin Spahr-Summers <Justin.SpahrSummers 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: -------
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


--- Comment #2 from Masahiro Nakagawa <repeatedly gmail.com> 2010-11-06
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


--- Comment #3 from Brad Roberts <braddr puremagic.com> 2011-02-06 15:40:34 PST
---
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


--- Comment #4 from yebblies <yebblies gmail.com> 2012-02-03 18:48:21 EST ---
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


--- Comment #5 from hsteoh quickfur.ath.cx 2012-03-13 22:40:40 PDT ---
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


--- Comment #6 from yebblies <yebblies gmail.com> 2012-03-23 22:40:54 EST ---
*** 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