[Issue 13118] Allow non-`@nogc` stuff in `@nogc` function contracts

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 8 16:40:47 UTC 2021


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

Stanislav Blinov <stanislav.blinov at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |stanislav.blinov at gmail.com
           See Also|                            |https://issues.dlang.org/sh
                   |                            |ow_bug.cgi?id=4995
         Resolution|---                         |INVALID

--- Comment #10 from Stanislav Blinov <stanislav.blinov at gmail.com> ---
2.098 rewrite:

void f() @nogc
in { new int; } // Error: cannot use `new` in `@nogc` function `f`
do { }

---

Which should stay. Contracts shouldn't alter expected behavior. If one wants an
escape hatch, there's `debug`.

--


More information about the Digitalmars-d-bugs mailing list