D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 23338 - braceless subarray initalizers for struct fields fails
Summary: braceless subarray initalizers for struct fields fails
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords: ImportC, pull
Depends on:
Blocks:
 
Reported: 2022-09-17 08:46 UTC by Walter Bright
Modified: 2022-09-17 11:05 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Walter Bright 2022-09-17 08:46:04 UTC
struct S {
    int a, b[2];
};

static struct S s = { 1, 2, 3 };

Should produce 3 ints, 1, 2, 3, but instead produces 1, 2, 2.
Comment 1 Dlang Bot 2022-09-17 08:58:32 UTC
@WalterBright created dlang/dmd pull request #14448 "fix Issue 23338 - braceless subarray initalizers for struct fields fails" fixing this issue:

- fix Issue 23338 - braceless subarray initalizers for struct fields fails

https://github.com/dlang/dmd/pull/14448
Comment 2 Dlang Bot 2022-09-17 11:05:18 UTC
dlang/dmd pull request #14448 "fix Issue 23338 - braceless subarray initalizers for struct fields fails" was merged into master:

- 9cf96d713b05e2114566839006e90e137fb8ef32 by Walter Bright:
  fix Issue 23338 - braceless subarray initalizers for struct fields fails

https://github.com/dlang/dmd/pull/14448