[Issue 24018] array concatenation doesn't work with disabled default construction

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 27 10:20:35 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24018

--- Comment #4 from Dlang Bot <dlang-bot at dlang.rocks> ---
@FeepingCreature created dlang/dmd pull request #15354 "Fix issue 24018: set
length manually via runtime function." fixing this issue:

- 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.

- 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