[Issue 15100] New: @nogc should ignore allocations on assertion fail
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Sep 22 11:36:05 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15100
Issue ID: 15100
Summary: @nogc should ignore allocations on assertion fail
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: jack at jackstouffer.com
per Steven Schveighoffer's suggestions
e.g. this should be allowed
void main() @nogc
{
import std.algorithm.sorting : isSorted;
import std.conv: text;
static immutable arr = [1, 2, 3, 4];
assert(isSorted(arr), "value " ~ text(arr) ~ " is not sorted");
}
--
More information about the Digitalmars-d-bugs
mailing list