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

kinke <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from kinke <[email protected]> ---
This seems caused by `scope` allocations for (D) classes getting an implicit
`delete stackConstD`, while C++ classes don't. Which is probably a bug in its
own right.

The `delete` expression is deprecated; it resets the pointer to null, that's
why it cannot be const. An updated lowering could use `destroy()` instead (it's
only about calling the dtor/finalizer AFAICT), for C++ classes too, which
should make it work with const as well (without dtor or with a const dtor).

--

Reply via email to