Anonymous classes should pass through super ctors

Jarrett Billingsley kb3ctd2 at yahoo.com
Fri Aug 15 06:47:33 PDT 2008


"Frank Benoit" <keinfarbton at googlemail.com> wrote in message 
news:g83v3k$n2u$1 at digitalmars.com...
> Anonymous classes should pass through super ctors, if no ctor is given.
>
> class C {
>    this( int i ){ .... }
>    abstract void run();
>    // ...
> }
>
> auto c = new class(3) C {
>    this( int a ){ super(a); } //<-- this line should not be necessary.
>    void run(){}
> };

All classes should pass through super ctors.  :| 





More information about the Digitalmars-d mailing list