On Mon, 28 Jun 2010 16:01:46 +0200, BCS <n...@anon.com> wrote:

Hello Rory,

On Sun, 27 Jun 2010 17:17:25 +0200, Philippe Sigaud
<philippe.sig...@gmail.com> wrote:

void main()
{
auto fun(string s) { return s;} // this does not compile
}

Hope this isn't a stupid question, but how would you access this
function
if it did work?
Would it be fun("asdf")?
Is this just shorthand for:
auto fun = function(string s) {return s;};

I would look almost the same to the user but should in fact be a normal local function.


Ye I got it now.

My brain was interpreting it as a delegate that wasn't being assigned to anything for some reason.

Now I get that it is just return type inferance doesn't work for inner functions.

-Rory

Reply via email to