super constructors question

Sean Kelly sean at
Sun Aug 13 11:30:31 PDT 2006

Serg Kovrov wrote:
> Hello everybody,
> Could someone explain why D do not lookup for appropriate super
> constructor? It is in specs:
>> If there is no constructor for a class, but there is a constructor  
>> for the base class, a default constructor of the form:
>> this() { }
> But i do not understand intension. Is it so hard for compiler to find
> suitable constructor in base class(es)?

I suspect this is because a default ctor is generated for classes with 
no ctor defined, and the lookup rules in D then keep the compiler from 
looking in base classes for a match since the current class has a ctor 


More information about the Digitalmars-d-learn mailing list