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

--- Comment #2 from Denis Shelomovskij <[email protected]> ---
(In reply to Kenji Hara from comment #1)
> This is not a regression, and a dup of issue 9148.
> 
> *** This issue has been marked as a duplicate of issue 9148 ***

Effectively this is a regression as this code used to work fine:
---
import std.algorithm;
import std.array;

auto makeInoutArray(alias func, T)(inout T[] src)
{
    return cast(inout) func(cast(T[]) src).array();
}

final class C
{
    int f(in uint) pure inout
    { return 1; }
}

final class C2
{
    C[] cs;
    uint var;

    void f() pure inout
    {
        cs.makeInoutArray!(arr => arr
            .map!((c) /*pure*/ => c.f(var))()
            )();
    }
}
---

It may be called a Phobos regression or whatever but it does break code.

How should we deal with such situations, when some bugs prevented some checks
and both correct and incorrect code worked, but introduced fixes rejected both
correct and incorrect codes?

--

Reply via email to