On Friday, 30 October 2015 at 21:38:40 UTC, bitwise wrote:
On Thursday, 29 October 2015 at 01:14:35 UTC, Tofu Ninja wrote:
On Thursday, 29 October 2015 at 00:11:06 UTC, Tofu Ninja wrote:
[...]
Actually never mind, what I just said was basically auto
override for this() so its not really any different. And it is
kinda limited with some problems.
It's not without issues, but changing it to 'this(this T =
void)()' makes it work(for one level of inheritance).
class Base
{
string str;
string function() fun;
this(this T = void)()
{
str = T.stringof;
fun = function() { return T.stringof;};
}
}
class Child : Base {}