Thread overview
[Issue 23596] override deprecated of deprecated base class could work
Jan 04, 2023
RazvanN
Jan 04, 2023
Adam D. Ruppe
Jan 04, 2023
RazvanN
January 04, 2023
https://issues.dlang.org/show_bug.cgi?id=23596

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |razvan.nitu1305@gmail.com

--- Comment #1 from RazvanN <razvan.nitu1305@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.

--
January 04, 2023
https://issues.dlang.org/show_bug.cgi?id=23596

Adam D. Ruppe <destructionator@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from Adam D. Ruppe <destructionator@gmail.com> ---
oh nice, then already fixed somehow since the previous release.

--
January 04, 2023
https://issues.dlang.org/show_bug.cgi?id=23596

RazvanN <razvan.nitu1305@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--