[Issue 12664] @nogc for lazy arguments too
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Apr 27 22:25:16 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12664
Kenji Hara <k.hara.pg at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|INVALID |DUPLICATE
--- Comment #5 from Kenji Hara <k.hara.pg at gmail.com> ---
Lazy argument is implicitly converted to "scope local" delegate. And the
original argument @safe-ty and purity are implicitly treated as they belong to
the caller side.
int foo(lazy int x) pure @safe { return x(); }
int get() { return 1; } // impure un at safe
void main()
{
foo(get()); // OK!
}
So I think that nothrow-ness and @nogc-ability should be treated as same.
*** This issue has been marked as a duplicate of issue 12647 ***
--
More information about the Digitalmars-d-bugs
mailing list