Dlang should support such coding. What should I do?

import std.stdio : writeln;

abstract class Base(T)
{
    this()
    {
        _this = this;
    }

    void hello()
    {
        _this.world();
    }

    private
    {
        T _this;
    }
}


class Sub : Base!Sub
{
    void world()
    {
        writeln("Hello world");
    }
}

void main()
{
    Sub sub = new Sub;
    sub.hello();
}

Reply via email to