Bug 22811 – use of destructor is hidden by subclass

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-02-22T18:23:46Z
Last change time
2024-12-13T19:21:07Z
Keywords
C++, rejects-valid
Assigned to
No Owner
Creator
Tim
Moved to GitHub: dmd#20059 →

Comments

Comment #0 by tim.dlang — 2022-02-22T18:23:46Z
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
Comment #1 by robert.schadek — 2024-12-13T19:21:07Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/20059 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB