Problem about lambda expressions

Timon Gehr timon.gehr at gmx.ch
Wed Mar 28 03:17:15 PDT 2012


On 03/28/2012 10:28 AM, Tongzhou Li wrote:
> On Wednesday, 28 March 2012 at 08:22:25 UTC, Tongzhou Li wrote:
>> I understood. But why it compiles instead of giving an error? What
>> does the complier do when I write the wrong code?
>
> Oh, I mean if I write the wrong code, what objectcode does the compiler
> generate?
> My English is not good, sorry.

(int a) => {return a;}

Is the same thing as

(int a){return ()=>a;}


More information about the Digitalmars-d-learn mailing list