https://issues.dlang.org/show_bug.cgi?id=12932
--- Comment #6 from Kenji Hara <[email protected]> --- (In reply to bearophile_hugs from comment #4) > 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 My PR does not support complex case. It would need more thought to improve the feature. --
