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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
            Version|unspecified                 |2.020
             Blocks|                            |1934
            Summary|Appalling bug in            |Appalling bug in
                   |associative arrays          |associative arrays (D2
                   |                            |only)
         OS/Version|Linux                       |All


--- Comment #1 from Don <clugd...@yahoo.com.au> 2009-09-13 23:51:08 PDT ---
This test case, from bug 1934, is part of the same issue: index expressions for 
AAs don't have proper type checking. In the case below, it's not converting the 
string literal into a char[3], and consequently, bad code generation results. 
Both asserts fail.

void main()
{
    char[char[3]] ac;
    char[3] c = "abc";
    ac["abc"]='a';
    assert(ac[c]=='a');    

    char[dchar[3]] ad;
    dchar[3] d = "abc"d;
    ad["abc"d]='a';
    assert(ad[d]=='a');
}

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

Reply via email to