On Wednesday, 3 May 2017 at 15:09:03 UTC, Andrej Mitrovic wrote:
On Wednesday, 3 May 2017 at 12:58:17 UTC, Daniel N wrote:
The trick is that your child class need to have defined at least 1 constructor before the alias.

This should work:
this() {}
alias __ctor = super.__ctor;

This will give the error message you saw:
alias __ctor = super.__ctor;
this() {}

I see. It does look like an accidental feature (as in, that it could break in the future).

Well, I was thinking one could put it in a mixin, then it would be officially supported and user-facing code wouldn't have to use __symbols. One benefit with using __ctor is that the syntax doesn't clash with future "alias this" improvements.

Reply via email to