[Issue 16980] [REG2.072.0] vtable issue in slightly complex scenario
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Dec 28 16:43:48 PST 2016
https://issues.dlang.org/show_bug.cgi?id=16980
--- Comment #2 from Martin Nowak <code at dawg.eu> ---
For whatever reason the ab in the ab.bar() call of the dtor isn't casted to B
(cast(B)dst.ab).bar(); // <- correct in main, offsets this (AB) by 8 byte
ab.bar(); // <- broken, uses this (AB) w/o offset which is A, thus methods of B
are called on A's vtbl
should be
(cast(B)ab).bar();
--
More information about the Digitalmars-d-bugs
mailing list