January 14, 2012
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: nobody@puremagic.com
        ReportedBy: dawg@dawgfoto.de


--- Comment #0 from dawg@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: -------
January 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7290


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #1 from Walter Bright <bugzilla@digitalmars.com> 2012-01-17 23:14:23 PST ---
https://github.com/D-Programming-Language/dmd/commit/d9428f6ac23e019abe30cbac55db605ff6ec2421

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