← Back to index
|
Original Bugzilla link
Bug 728 – incorrect initialisation of member arrays if an explicit struct initializer is used
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-12-23T07:11:00Z
Last change time
2014-02-15T13:19:40Z
Assigned to
bugzilla
Creator
thomas-dloop
Comments
Comment #0
by thomas-dloop — 2006-12-23T07:11:42Z
(Originally reported by Andrew Fedoniouk <
[email protected]
> on 2005-03-10 in news:
[email protected]
) # # import std.stdio; # # struct S{ # int i; # int[4] bar = 4; # } # # S a = {i: 1}; # S b; # # void main(){ # writefln("a.bar: %s", a.bar); # writefln("b.bar: %s", b.bar); # } # output: > a.bar: [4,0,0,0] > b.bar: [4,4,4,4] expected output: > a.bar: [4,4,4,4] > b.bar: [4,4,4,4] test cases:
http://dstress.kuehne.cn/run/struct_initialization_06.d
Comment #1
by bugzilla — 2007-01-03T22:06:56Z
Fixed DMD 1.00