https://issues.dlang.org/show_bug.cgi?id=17645

Steven Schveighoffer <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Steven Schveighoffer <[email protected]> ---
Do you have a better use case? This works:

void f() pure {
    void function() dg = {x++;};
}

i.e. you don't need access to the pure function's stack frame, so you can have
a function instead of a delegate.

I'm kind of surprised the compiler inferred dg as a delegate and not a function
in the first place.

--

Reply via email to