digitalmars.D.bugs - [Issue 21497] New: "Error: unknown" for generating struct using CTFE
- d-bugmail puremagic.com (35/35) Dec 20 2020 https://issues.dlang.org/show_bug.cgi?id=21497
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: nobody puremagic.com Reporter: tim.dlang t-online.de //////////////// 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 --
Dec 20 2020