[Issue 24453] [REG2.108] idup fails for inout(T)[] slices
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Mar 26 16:26:48 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24453
Steven Schveighoffer <schveiguy at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |schveiguy at gmail.com
--- Comment #1 from Steven Schveighoffer <schveiguy at gmail.com> ---
druntime regression, though really we should just fix the `inout` restriction.
The `_d_newarrayUPureNothrow` is building an array of `inout(char)`, which is
wrong at this point. It should always return mutable data, and then properly
cast at the right place. Ideally, only one cast should ever be present.
The prior version of druntime avoids all the casts by just using `extern(C)`
functions with `TypeInfo` and void arrays.
Change is here: https://github.com/dlang/dmd/pull/16097
--
More information about the Digitalmars-d-bugs
mailing list