[Issue 18407] debug should escape nothrow, @nogc, @safe (not just pure)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Feb 9 07:00:56 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18407
--- Comment #2 from Timothee Cour <timothee.cour2 at gmail.com> ---
workaround suggested here by Adam Ruppe:
https://forum.dlang.org/post/ojgxdtqodcamkqcrxgqc@forum.dlang.org
```
void foo() {}
@trusted nothrow @nogc void da(scope void delegate() a) {
auto hack = cast(void delegate() @nogc) a;
try
hack();
catch(Exception e)
assert(0, e.msg);
}
@safe nothrow @nogc pure void main() {
debug da({foo();});
}
```
--
More information about the Digitalmars-d-bugs
mailing list