[Issue 17341] Partial initialization of static array should not be allowed
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sat Apr 22 10:23:11 PDT 2017
https://issues.dlang.org/show_bug.cgi?id=17341
--- Comment #1 from b2.temp at gmx.com ---
(In reply to b2.temp from comment #0)
> In this example:
>
> ```
> enum E{e0,e1,e2}
> static immutable int[E.max + 1] a = [0,1]; // oops no 3rd element
> static assert(isStaticArray!(typeof(a))); // no detected
> ```
The static assert should be
static assert(a.length == E.max + 1); // not detected
--
More information about the Digitalmars-d-bugs
mailing list