Anonymous classes should pass through super ctors

BCS ao at pathlink.com
Fri Aug 15 09:34:40 PDT 2008


Reply to Jarrett,

> "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.  :|
> 

There needs to be a way to block that. That said, the current block-by-default 
is annoying.





More information about the Digitalmars-d mailing list