October 10, 2019 [Issue 2237] string mixin + const array = array literal constructed upon every use (??!?!) | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=2237 RazvanN <razvan.nitu1305@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED CC| |razvan.nitu1305@gmail.com Resolution|--- |FIXED --- Comment #4 from RazvanN <razvan.nitu1305@gmail.com> --- The issue does not manifest in D2 (git master). The code generated for: const int[] arr = mixin("[5, 6]"); is identical to the one generated on for: mixin("const int[] arr = [5, 6];"); i.e. It actually puts the array in the static data segment and accesses it from there, like it should. Closing as fixed. -- |
Copyright © 1999-2021 by the D Language Foundation