Please again, any example? I'm trying to figure out how it should be done but i don't have any base from which i can build some solution.

#!/usr/bin/rdmd

import std.stdio;

interface RequestResult
{

        int add (int x);

}

class B : RequestResult
{
        int add(int x)
        {
                return ++x;
        }
}

class A
{
        RequestResult go(int varA, int varB)
        {
                return add(varA + varB);
        }
}

void main()
{
        B b = new B();
        A a = new A();
        int x = 12;
        int y = 15;


        RequestResult c = A.go(x, y);
}

It even don't want to compile, but that probably not what you ware thinking about.

[holo@ultraxps workplace]$ dmd test.d
test.d(24): Error: undefined identifier 'add'
test.d(38): Error: need 'this' for 'go' of type 'RequestResult(int varA, int varB)'
[holo@ultraxps workplace]$

Reply via email to