DMD issues deprecation warnings when a deprecated method overrides another deprecated method. Example: class A { deprecated void foo() {} } class B { deprecated override void foo() {} // onlineapp.d(8): Deprecation: `onlineapp.B.foo` is overriding the deprecated method `onlineapp.A.foo` // onlineapp.d(8): Deprecation: `onlineapp.B.foo` cannot be marked as `deprecated` because it is overriding a function in the base class } There's no good reason to reject that code given that both methods acknowledge that `foo` is deprecated. This is especially bad when a library wants to deprecate a method that is implemented by several different classes - the deprecation warnings should then appear in the user code but are currently triggered inside of the library.
@MoonlightSentinel created dlang/dmd pull request #13533 "Fix 22668 - Don't errors when a deprecated method overrides another one" fixing this issue: - Fix 22668 - Don't errors when a deprecated method overrides another one Because both declarations acknowledge that the declaration is deprecated. This is especially important for libraries that provide a collection of classes and want to deprecate certain method throughout the entire class hierarchy. https://github.com/dlang/dmd/pull/13533
dlang/dmd pull request #13533 "Fix 22668 - Don't error when a deprecated method overrides another one" was merged into master: - eb9c1b9c071620f7f19a34401af4bf165de3cad6 by MoonlightSentinel: Fix 22668 - Don't errors when a deprecated method overrides another one Because both declarations acknowledge that the declaration is deprecated. This is especially important for libraries that provide a collection of classes and want to deprecate certain method throughout the entire class hierarchy. https://github.com/dlang/dmd/pull/13533