[Issue 14878] destructor of lambda parameter not included in speculative @safe check
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Thu Aug 6 06:54:22 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=14878
--- Comment #1 from Kenji Hara <k.hara.pg at gmail.com> ---
(In reply to Martin Nowak from comment #0)
> static assert(!__traits(compiles, (T) @safe {}));
> static assert(!is(typeof((T) @safe {})));
`(T) @safe {}` is a lambda with untyped parameter name T.
Following static asserts work as you expects.
static assert(!__traits(compiles, (T b) @safe {}));
static assert(!is(typeof((T b) @safe {})));
--
More information about the Digitalmars-d-bugs
mailing list