Hi,

please consider following example. I want to acces class B by interface I.
Method "work" should print the actual class ("B").

The linker say:
 Error 42: Symbol Undefined _D3app1I17__T4workTC3app1IZ4workMFZv

Is this is missing feature or even a bug?
Is there any other way to get the actual class ("B") printed
by the inherited method from A?

Kind regards
André

interface I
{
        void work(this MyType)();
}

class A : I
{
        void work(this MyType)()
        {
                import std.stdio;
                writeln(MyType.stringof);
        }
}

class B : A {}

void main()
{
        I i = new B();
        i.work(); // Expected output: "B"
}

Reply via email to