[Issue 6421] Require initialization of static arrays with array literals not to allocate
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri May 15 03:53:33 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=6421
Mathias LANG <pro.mathias.lang at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |pro.mathias.lang at gmail.com
Resolution|--- |FIXED
--- Comment #18 from Mathias LANG <pro.mathias.lang at gmail.com> ---
```
void main () @nogc
{
int[3] a = [1, 2, 3];
a = [4, 5, 6];
}
```
This does not allocate anymore.
The static array literal syntax would be nice, but Walter has vetoed it IIRC.
Closing as fixed.
--
More information about the Digitalmars-d-bugs
mailing list