[Issue 12664] @nogc for lazy arguments too

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Apr 27 07:57:34 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=12664

--- Comment #2 from bearophile_hugs at eml.cc ---
(In reply to Sobirari Muhomori from comment #1)

> The third example can't infer attributes because it doesn't create the
> delegate, and can't accept arbitrary type info because it's not templated.

Thank you, I understand now :-)

Is it a good idea to allow annotations for lazy arguments?

void foo(T)(lazy @nogc x) @nogc {
    auto r = x();
}
void main() {
    foo(1);
}


I guess lazy arguments are not used commonly enough to deserve such
improvements.

--


More information about the Digitalmars-d-bugs mailing list