[Issue 20582] destroy should be @nogc if class destructor is @nogc

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Feb 15 14:27:41 UTC 2020


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

moonlightsentinel at disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |moonlightsentinel at disroot.o
                   |                            |rg
           Hardware|x86_64                      |All
         Resolution|---                         |DUPLICATE
                 OS|Linux                       |All

--- Comment #1 from moonlightsentinel at disroot.org ---
This is effectively caused by the way destructor chaining is implemented using
rt_finalize (which iterates all destructors using RTTI). This makes static type
checking for chained destructors impossible right now.

So even if the destructor of the current class is @nogc those found in the
parent classes might not be - without checking.

*** This issue has been marked as a duplicate of issue 15246 ***

--


More information about the Digitalmars-d-bugs mailing list