Anonymous classes should pass through super ctors

Sean Kelly sean at invisibleduck.org
Mon Aug 18 12:13:42 PDT 2008


Bruno Medeiros wrote:
> Jarrett Billingsley wrote:
>> "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.  :|

Okay... I decided to dig up the proposal after all:

http://www.digitalmars.com/d/archives/digitalmars/D/Inheriting_constructors_54088.html


Sean



More information about the Digitalmars-d mailing list