On Tuesday, 14 August 2018 at 16:31:38 UTC, Paul Backus wrote:
On Tuesday, 14 August 2018 at 13:01:57 UTC, learnfirst1 wrote:

enum string[] a = ["a"];

extern(C) void main() {
        int i = 0;
        auto s = a[i];
}
---------------
Error: TypeInfo cannot be used with -betterC

Workaround: https://run.dlang.io/is/NZykl0

Source: https://p0nce.github.io/d-idioms/

FYI: staticArray will be part of 2.082, it already works with dmd-nightly:

https://run.dlang.io/is/tC7tix

Reply via email to