[Issue 13118] Allow non-`@nogc` stuff in `@nogc` function contracts
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 13 08:23:23 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13118
yebblies <yebblies at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |yebblies at gmail.com
--- Comment #3 from yebblies <yebblies at gmail.com> ---
(In reply to Denis Shelomovskij from comment #0)
> This code should compile:
> ---
> void f() @nogc
> in { new int; }
> body { }
> ---
>
> Note this is already the case for `nothrow` functions as one can throw
> `Exception`s in contracts which allows e.g. use `assert(expr, format(...))`.
assert throws an error and does not violate nothrow.
--
More information about the Digitalmars-d-bugs
mailing list