[Issue 12932] Support @nogc for immediately iterated array literal
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jun 16 08:41:23 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12932
--- Comment #4 from bearophile_hugs at eml.cc ---
Currently this gets rejected, is this right?
void main() @nogc {
foreach ( a; [[1]]) {}
foreach (int[1] a; [[1]]) {}
}
test.d(2): Error: array literal in @nogc function main may cause GC allocation
test.d(3): Error: array literal in @nogc function main may cause GC allocation
--
More information about the Digitalmars-d-bugs
mailing list