Trying to pass lambda to function gives strange error

Incognito via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 11 15:58:00 PDT 2016


function foo (double x, double y, bool function(bar) callback)
is not callable using argument types
(double, double, bool function() pure nothrow @nogc @safe 
function(bar w) pure nothrow @nogc @safe)

I've tried with passing a delegate.

I am calling it like

foo(0,0, (bar b) => { return true; });

It seems the only difference is all those attributes?!?! Surely I 
don't have to specify all that junk when creating a lambda?






More information about the Digitalmars-d-learn mailing list