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

          Issue ID: 21497
           Summary: "Error: unknown" for generating struct using CTFE
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

//////////////// test.d ////////////////
struct T
{
        ubyte[16] data;
}

void assignZero(T)(ref T dst)
{
        dst[] = 0;
}

static test =
        {
                T r;
                r.data.assignZero();
                return r;
        }();
////////////////////////////////////////

dmd v2.094.2 gives the following error message when compiling:
test.d(14):        called from here: assignZero(r.data)
test.d(16):        called from here: (*function () pure nothrow @nogc @safe =>
r)()
Error: unknown, please file report on issues.dlang.org

--

Reply via email to