So what does (inout int = 0) do?

Timon Gehr via Digitalmars-d digitalmars-d at puremagic.com
Sun Apr 17 14:20:49 PDT 2016


On 17.04.2016 18:44, Nick Treleaven wrote:
> I think @property is OK.

No, it isn't:

import std.stdio;
struct S{
     @property int delegate() foo(){ return ()=>3; }
}

void main(){
     S s;
     writeln(s.foo()); // "int delegate()"
}



More information about the Digitalmars-d mailing list