Bug 22211 – partial initialization of first element of fixed size ("static") array rejected

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-08-14T13:45:57Z
Last change time
2024-12-13T19:18:05Z
Assigned to
No Owner
Creator
kdevel
Moved to GitHub: dmd#18052 →

Comments

Comment #0 by kdevel — 2021-08-14T13:45:57Z
void main () { char [7] b = [ 1: 'x' ]; // okay char [7] a = [ 0: 'x' ]; // i1.d(4): Error: mismatched array lengths, 7 and 1 } $ dmd --version DMD32 D Compiler v2.096.1 https://forum.dlang.org/thread/[email protected]
Comment #1 by robert.schadek — 2024-12-13T19:18:05Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18052 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB