[Issue 24355] Slice copy with static arrays incorrect bounds checking

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jan 26 12:57:06 UTC 2024


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

--- Comment #4 from Nick Treleaven <nick at geany.org> ---
> An array *initializer* is allowed to have fewer elements.

Actually that only seems to apply when the initializer is a string literal.

char[4] s = [1]; // error
char[4] s = "a"; // OK

--


More information about the Digitalmars-d-bugs mailing list