[Issue 2237] string mixin + const array = array literal constructed upon every use (??!?!)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Oct 10 14:54:26 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=2237
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
CC| |razvan.nitu1305 at gmail.com
Resolution|--- |FIXED
--- Comment #4 from RazvanN <razvan.nitu1305 at 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.
--
More information about the Digitalmars-d-bugs
mailing list