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

--- Comment #4 from Nick Treleaven <n...@geany.org> ---
(In reply to RazvanN from comment #2)
> The safest and most restrictive solution would be to simply allow the
> conversion only if the function is strongly pure, thus disallowing the
> latter case, however, this may break code out there.

The fix for issue 15660 is related, which was changed to only disallow the
conversion with the -preview=fixImmutableConv switch:
https://dlang.org/changelog/2.101.0.html#dmd.fix-immutable-conv

That switch could be used to disallow this case too.

--

Reply via email to