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

           Summary: Heap allocation with scoped delegate literal
           Product: D
           Version: D2
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: d...@dawgfoto.de


--- Comment #0 from d...@dawgfoto.de 2012-01-14 00:55:28 PST ---
int foo(alias pred)(int val)
{
    return pred(val);
}

int bar(int val)
{
    scope pred = (int a) => a + val; //<- causes allocation
    return foo!(pred)(2);
}

void main()
{
    bar(3) == 5 || assert(0);
}

----

Related to resolved
http://d.puremagic.com/issues/show_bug.cgi?id=7120

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

Reply via email to