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

--- Comment #3 from kinke <[email protected]> ---
To be clear, this is no double-destroy issue, as can be seen when printing the
addresses of the destructed instances in the 2nd test case. The problem in the
2nd test case is that `MyMapResult.front()` returns a copy of `er.substs[0]`,
with `er` already having been destructed (due to the actual issue), so it
returns a copy of an `S(99)`, which then gets destructed, and the check then
wrongly complaining about a double-destroy, while in reality it's a destruction
of a copy of a destructed S instance.

--

Reply via email to