[Issue 12932] New: Support @nogc for immediately iterated array literal
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jun 16 06:44:13 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12932
Issue ID: 12932
Summary: Support @nogc for immediately iterated array literal
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
This code should work as expected.
void main() @nogc
{
int sum;
foreach (e; [1,2,3])
{
sum += e;
}
assert(sum == 6);
}
--
More information about the Digitalmars-d-bugs
mailing list