Const lazy arguments?

bearophile bearophileHUGS at lycos.com
Tue Jan 10 20:46:04 PST 2012


I ask here first before submitting about this to Bugzilla.

If lazy arguments can't be lvalues:


void foo(lazy int x) {
    x = x;
}
void main() {}

==>
test.d(2): Error: lazy variables cannot be lvalues


What's the point of accepting const lazy arguments?

void foo(const lazy int x) {}
void main() {}

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list