https://issues.dlang.org/show_bug.cgi?id=13732

--- Comment #2 from Meta <[email protected]> ---
import std.stdio;

class Base {
    void test1(T = typeof(this))() {
        writeln("test1: ", T.stringof);
    }

    void test2(this T)() {
        writeln("test2: ", T.stringof);
    }
}

class Derived: Base {
}

void main()
{
    new Base().test1();    //test1: Base
    new Base().test2();    //test2: Base

    new Derived().test1(); //test1: Base
    new Derived().test2(); //test1: Derived
}

--

Reply via email to