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

          Issue ID: 13118
           Summary: Allow non-`@nogc` stuff in `@nogc` function contracts
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: DMD
          Assignee: nob...@puremagic.com
          Reporter: verylonglogin....@gmail.com

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(...))`.

--

Reply via email to