https://issues.dlang.org/show_bug.cgi?id=16980

--- Comment #3 from Martin Nowak <c...@dawg.eu> ---
Semantic for this.ab.bar() in the dtor runs first.
The cast gets incorrectly optimized away, because the offset returned by
cdto.isBaseOf(cdfrom, &offset) [¹] is 0 instead of 8.
Maybe the struct size for one of the classes hasn't been finalized.

[¹]:
https://github.com/dlang/dmd/blob/3cbb4d8dee6c2be433a147996c445db0ccdc81db/src/optimize.d#L596

--

Reply via email to