Bug 11672 – default initialization of static array of structs with a single value fails

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-03T14:48:00Z
Last change time
2014-05-30T17:59:53Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
nilsbossung

Comments

Comment #0 by nilsbossung — 2013-12-03T14:48:35Z
--- cat > test.d << code struct V {float f;} struct S { V[3] v = V(1); } void main() { S s; assert(s.v == [V(1), V(1), V(1)]); /* fails, is [V(42), V(nan), V(nan)] */ } code rdmd test.d --- core.exception.AssertError@test(9): Assertion failure ---
Comment #1 by k.hara.pg — 2014-05-29T01:54:54Z
Comment #2 by github-bugzilla — 2014-05-30T17:59:52Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cc73490ef51e03e1831010e91d45fc217783cfeb fix Issue 11672 - default initialization of static array of structs with a single value fails https://github.com/D-Programming-Language/dmd/commit/cdc1127129cda1c343e1a1b095f6ca517a9cd806 Merge pull request #3604 from 9rnsr/fix11672 Issue 11672 - default initialization of static array of structs with a single value fails