[Issue 23596] override deprecated of deprecated base class could work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 4 12:06:13 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23596
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |razvan.nitu1305 at gmail.com
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
> I can change the base class to remove `abstract` to make it work, but it
> would be nice if there was a way to indicate it on the base but also
> indicate it as handled on the child; I think an `override deprecated` ought
> to suppress the warning and pass it on to the next user.
>
>
> Probably related to : https://issues.dlang.org/show_bug.cgi?id=17586
If I understand correctly, you want this code:
class Base
{
deprecated("Use newWay instead") abstract string oldWay();
abstract string newWay();
}
class Child : Base
{
override string newWay() { return "yay"; }
override deprecated string oldWay() { return newWay(); }
}
void main()
{
auto child = new Child();
}
To compile gracefully? If that is the case, then this already happens in the
latest master.
--
More information about the Digitalmars-d-bugs
mailing list