[Issue 22680] @safe hole with destructors

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 29 13:24:53 UTC 2022


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

Dennis <dkorpel at live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel at live.nl

--- Comment #5 from Dennis <dkorpel at live.nl> ---
(In reply to Stanislav Blinov from comment #4)
> There would be unwanted side effects. On a struct, for example, marking a
> destructor scope would prevent you from returning instances of such struct.

No, it only adds restrictions to the destructor's function body, not the
destructor's caller.

--


More information about the Digitalmars-d-bugs mailing list