[Issue 272] New: foreach inside anonymous function crashes dmd.exe

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jul 29 19:19:20 PDT 2006


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

           Summary: foreach inside anonymous function crashes dmd.exe
           Product: D
           Version: 0.163
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: reg4dyh at inbox.lv


Using foreach in anonymous function body crases dmd.exe due some assertion
failure.
-------------------------------------------------------
import std.stdio;
alias void function(char[][char[]]) FN;
int main(char[][] args)
{
        FN fn = function(char[][char[]] aarray)
        {
                foreach (char[] s; aarray){}; // <- here
        };
        char[][char[]] aarray;
        aarray["a"] = "b";
        fn(aarray);
        return 0;
}


-- 




More information about the Digitalmars-d-bugs mailing list