[Issue 24018] array concatenation doesn't work with disabled default construction
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 27 12:51:14 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=24018
Dlang Bot <dlang-bot at dlang.rocks> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #5 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/dmd pull request #15354 "Fix issue 24018: set length manually via runtime
function." was merged into master:
- f17d270cacabbb192c9f01a2aecd10e1389fcf8e by Mathis Beer:
Fix issue 24018: make `array.length = n` `@system` if default construction is
disabled on the array type.
This is needed as there is otherwise no good way to resize an array of
non-constructable elements in user code at all.
- e37e3f18844494166ac3b68f2b5b6bf450867712 by Mathis Beer:
Fix issue 24018: instead of calling `array.length =`, call the runtime
function that implements `array.length =` instead.
This skips the check for the element type being constructable, which is
correct because concatenation doesn't expose unconstructed memory anyway.
https://github.com/dlang/dmd/pull/15354
--
More information about the Digitalmars-d-bugs
mailing list