I implemented delegates in D

Martin Nowak via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 11 15:21:03 PDT 2016


On 06/10/2016 12:17 AM, Steven Schveighoffer wrote:
> On 6/9/16 6:06 PM, Mathias Lang via Digitalmars-d wrote:
>> To avoid the delegate being GC allocated, use `scope foo = (int i) { ...
>> }` at call site.
> 
> Is that true? At one point in D's past, this ONLY worked if you passed a
> delegate to a function accepting a scope delegate. Maybe it's been fixed.
> 
> -Steve

I fixed that more than 4 years ago, https://github.com/dlang/dmd/pull/625.


More information about the Digitalmars-d mailing list