On 6/22/15 3:04 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <[email protected]>" wrote:
Just lower it to:

     {
         auto tmp = 5;
         fun(tmp);
     }

You need to lower an expression to an expression, not a statement. (e.g. what if fun returns a result?)

I considered this lowering for "int fun(ref int);"

fun(42)

==>>

(function int(int a) { return fun(a); })(42)

This does work, but if fun returns a ref int, I found no way to syntactically express that lambda. This does not parse:

(function ref int(int a) { return fun(a); })(42)

Is this a bug in the grammar?


Andrei

Reply via email to