[Issue 19840] Ice in e2ir.d visit(CastExp) assert(false, "This case should have been rewritten to `__ArrayCast` in the semantic phase");

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 1 13:36:15 UTC 2019


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

--- Comment #1 from Nicholas Wilson <iamthewilsonator at hotmail.com> ---
The extra R struct is not necessary in the above

The following crashes with a much deeper call stack (27 vs. 8):

struct G
{
        ubyte[] I;
        alias I this;
}

auto M(ubyte[])
{
        G N;
        return N;
}

struct U { int V; }

void X()
{
        func((cast(U[])[].M));
}

void func(U[]) {}

--


More information about the Digitalmars-d-bugs mailing list