https://issues.dlang.org/show_bug.cgi?id=809
Andrei Alexandrescu <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #8 from Andrei Alexandrescu <[email protected]> --- On the face of it, a lazy parameter is a delegate so the request makes sense. On the other hand lazy T is meant to be "pretty much the same as T". This works today: void test(lazy int dg){ int delegate() dg_ = { return dg; }; } I'm not sure how it interacts with attributes and qualifiers. This could be made to work: void test(lazy int dg){ int delegate() dg_ = &dg; } Currently, oddly enough (and definitely a bug), this issues an unfit error message: void test(lazy int dg){ auto x = &dg; } "Error: lazy variable dg cannot be modified" :o) So it seems like taking the address of a lazy is "available" and could return the underlying delegate. --
