[Issue 8526] New: DMD 2.060 regression: anonymous delegate call in foreach loop

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 9 00:35:04 PDT 2012


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

           Summary: DMD 2.060 regression: anonymous delegate call in
                    foreach loop
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: wrong-code
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: thecybershadow at gmail.com


--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 2012-08-09 00:34:53 PDT ---
void call(void delegate() callback)
{
    callback();
}

void f(int j, int i)
{
}

void main()
{
    foreach (int i, j; [0])
        call({
            f(j, i);
        });
}

Works on 2.059, segfaults on 2.060. Tested on Win32 and Linux/64.

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


More information about the Digitalmars-d-bugs mailing list