[Issue 23097] [REG 2.100] ArrayIndexError at src/dmd/mtype.d(4767): index [18446744073709551615] is out of bounds for array of length 0

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon May 9 22:46:13 UTC 2022


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

--- Comment #2 from Iain Buclaw <ibuclaw at gdcproject.org> ---
This is a compilable reduction.
---
void emplaceRef(UT, Args)(UT chunk, Args args)
{
    static if (__traits(compiles, chunk = args))
        chunk;
}

struct CpCtor23097(T)
{
    T* payload;
    this(ref inout typeof(this)) { }
    ref opAssign(typeof(this)) { }
}

struct S23097
{
    CpCtor23097!int adjustments;
}

void test23097(S23097 lhs, const(S23097) rhs)
{
    emplaceRef(lhs, rhs);
}

--


More information about the Digitalmars-d-bugs mailing list