[Issue 24763] New: Can't initialize a struct with a static array

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Sep 12 12:18:16 UTC 2024


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

          Issue ID: 24763
           Summary: Can't initialize a struct with a static array
           Product: D
           Version: D2
          Hardware: x86_64
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: ryuukk.dev at gmail.com

```D
struct Test
{
    int test;
}

struct Data
{
    Test[8] test;
}

void add(Data data)
{
}

extern(C) void main()
{
    add( Data(test: [ {test: 1}] ) );
}

```

This doesn't compile, it should

--


More information about the Digitalmars-d-bugs mailing list