[Issue 22211] New: partial initialization of first element of fixed size ("static") array rejected

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Aug 14 13:45:57 UTC 2021


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

          Issue ID: 22211
           Summary: partial initialization of first element of fixed size
                    ("static") array rejected
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: kdevel at vogtner.de

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/earlmpioipfwnrhwmxlt@forum.dlang.org

--


More information about the Digitalmars-d-bugs mailing list