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

           Summary: Cannot foreach over AA with char as key type
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optlink
        AssignedTo: nob...@puremagic.com
        ReportedBy: ruzicic.aleksan...@gmail.com


--- Comment #0 from Aleksandar Ruzicic <ruzicic.aleksan...@gmail.com> 
2011-08-01 18:37:36 CEST ---
This code:

--------------------------------------

string[char] aa = [
  'f': "foo",
  'b': "bar"
];

foreach (ch, str; aa) {
  writefln("[%s]: [%s]", ch, str);
}

--------------------------------------

Compiles fine but optlink complains:

OPTLINK (R) for Win32  Release 8.00.12
Copyright (C) Digital Mars 1989-2010  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
test.obj(test)
 Error 42: Symbol Undefined
_D6object28__T16AssociativeArrayTaTAyaZ16AssociativeArray7opApplyMFMDFKaKAyaZiZi
--- errorlevel 1


while this compiles and links without problem:

--------------------------------------

string[string] aa = [
    "f": "foo",
    "b": "bar"
];

foreach (ch, str; aa) {
    writefln("[%s]: [%s]", ch, str);
}

--------------------------------------

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

Reply via email to