[Issue 13118] New: Allow non-`@nogc` stuff in `@nogc` function contracts
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Jul 13 01:01:54 PDT 2014
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: nobody at puremagic.com
Reporter: verylonglogin.reg at 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(...))`.
--
More information about the Digitalmars-d-bugs
mailing list