Can't compile the code

Ali Çehreli acehreli at yahoo.com
Sun Apr 28 08:23:33 PDT 2013


On 04/28/2013 01:53 AM, Temtaime wrote:
> int main() {
>          auto f = (bool = false) {};
>
>          f();
>          return 0;
> }
>
> I can't compile this code on
> DMD32 D Compiler v2.062
>
> On windows. It says to me:
> Error: expected 1 function arguments, not 0
>
> On linux it seems to work(http://ideone.com/fsKYWR).

It is probably one of the known issues with default delegate parameters:

   http://d.puremagic.com/issues/show_bug.cgi?id=3866

Ali



More information about the Digitalmars-d-learn mailing list