Re: Delegating constructor and call to super

2018-07-02 Thread Mike Parker via Digitalmars-d-learn
On Monday, 2 July 2018 at 09:42:36 UTC, Robert M. Münch wrote: I think it's because of "If a constructor's code contains a delegate constructor call, all possible execution paths through the constructor must make exactly one delegate constructor call" But, how am I supposed to call the

Delegating constructor and call to super

2018-07-02 Thread Robert M. Münch via Digitalmars-d-learn
class A { this(){...} this(int a) {...} this int a, int b){...} } class B { this(){... init some stuff for B ...} this(int a){super(a); this();} } Error: multiple constructor calls I think it's because of "If a constructor's code contains a delegate