Ddoc inheritance

Ary Manzana ary at esperanto.org.ar
Mon Jun 11 19:20:04 PDT 2012


On 6/12/12 8:59 , Alex Rønne Petersen wrote:
> Hi,
>
> Suppose I have:
>
> abstract class A
> {
> /// My very long and helpful documentation.
> void foo();
> }
>
> class B : A
> {
> override void foo()
> {
> }
> }
>
> Is there any way I can instruct Ddoc to copy the documentation from
> A.foo to B.foo? Copying it over manually is a maintenance nightmare.
>
> Would be neat if you could do something like ditto:
>
> /// inherit
> override void foo()
> {
> }
>

I believe no special comment is needed for this. If you override a 
method without commenting it it should retain the original comment. If 
you do comment it, it should take that new comment.

A patch for this should be really easy to do. Maybe I'll do it after 
(and if) my previous patch gets accepted.


More information about the Digitalmars-d-learn mailing list