[Issue 22811] New: use of destructor is hidden by subclass
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Tue Feb 22 18:23:46 UTC 2022
    
    
  
https://issues.dlang.org/show_bug.cgi?id=22811
          Issue ID: 22811
           Summary: use of destructor is hidden by subclass
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: tim.dlang at t-online.de
The following code current does not compile:
extern(C++):
class A
{
    ~this();
}
class B : A
{
    ~this();
}
class C : B
{
}
class D : C
{
    ~this();
}
DMD produces the following error:
test.d(13): Error: class `test.D` use of `test.B.~this()` is hidden by `D`; use
`alias ~this = B.~this;` to introduce base class overload set
--
    
    
More information about the Digitalmars-d-bugs
mailing list