https://issues.dlang.org/show_bug.cgi?id=13381
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|One case of array literal |Two cases of array literal |that can be stack-allocated |that can be stack-allocated --- Comment #12 from [email protected] --- Another case worth optimizing: void main() @nogc { import std.traits: EnumMembers; enum Foo { A, B, C, D } size_t i = 2; Foo[4] foos = [EnumMembers!Foo]; // OK auto r1 = foos[i]; auto r2 = [EnumMembers!Foo][i]; // Error: array literal in @nogc } --
