std.string.assumeUTF() silently casting mutable to immutable?
RazvanN
razvan.nitu1305 at gmail.com
Wed Feb 14 10:57:42 UTC 2024
On Wednesday, 14 February 2024 at 02:13:08 UTC, Forest wrote:
> On Tuesday, 13 February 2024 at 14:05:03 UTC, Johan wrote:
>> On Tuesday, 13 February 2024 at 08:10:20 UTC, Jonathan M Davis
>> wrote:
>>>
>>> So, there's definitely a bug here, but it's a dmd bug. Its
>>> checks for whether it can safely change the constness of the
>>> return type apparently aren't sophisticated enough to catch
>>> this case.
>>
>> This is a pretty severe bug.
>
> Thanks, gents.
>
> Reported on the tracker:
>
> https://issues.dlang.org/show_bug.cgi?id=24394
This has already been fixed, you just need to use
-preview=fixImmutableConv. This was put behind a preview flag as
it introduces a breaking change.
More information about the Digitalmars-d-learn
mailing list