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

--- Comment #2 from Forest <fores...@nom.one> ---
The above example does indeed trigger an error with -preview=fixImmutableConv
on run.dlang.org. However, changing the test function's argument to
const(ubyte)[] slips right past with no complaint.

Shouldn't that be rejected as well?


string test(const(ubyte)[] arr)
{
    import std.string;
    return arr.assumeUTF; // why does this compile?
}

--

Reply via email to