Lambda cannot access frame of function

Adam D. Ruppe destructionator at gmail.com
Sat Nov 18 14:30:29 UTC 2017


On Saturday, 18 November 2017 at 14:22:19 UTC, kerdemdemir wrote:
> bool foo(  bool function( double ) controlFoo )

Change that `function` to `delegate` and it should work.

Function pointers aren't allowed to access other locals, but 
delegates are.


More information about the Digitalmars-d-learn mailing list