Bug 9116 – Redundant field postblit call on initializing

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-12-06T00:44:00Z
Last change time
2012-12-06T20:22:07Z
Keywords
pull, wrong-code
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-12-06T00:44:54Z
This code doesn't work es expected. void main() { static struct X { int v; this(this) { ++v; } } static struct Y { X x; } X x = X(1); assert(x.v == 1); Y y = Y(X(1)); printf("y.x.v = %d\n", y.x.v); // print 2, but should 1 assert(y.x.v == 1); // fails }
Comment #1 by k.hara.pg — 2012-12-06T00:51:59Z
Comment #2 by github-bugzilla — 2012-12-06T06:22:47Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/943a2cb2ea5f21bd82db9cffaee0b6a520648886 fix Issue 9116 - Redundant field postblit call on initializing https://github.com/D-Programming-Language/dmd/commit/7853b9292765b1f10277d965f921aa9915c28d67 Merge pull request #1352 from 9rnsr/fix9116 Issue 9116 - Redundant field postblit call on initializing